[msl] Regenerate test expectations

Many test inputs recently changed for new vertex shader restrictions.

Also update skip files to make it easier to see the remaining causes
of failure.

Bug: 42251016
Change-Id: I76758a6c9a70a29ffb8540223c6fc292816363cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/196354
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/test/tint/benchmark/particles.wgsl.expected.ir.msl b/test/tint/benchmark/particles.wgsl.expected.ir.msl
index f169ea5..5237630 100644
--- a/test/tint/benchmark/particles.wgsl.expected.ir.msl
+++ b/test/tint/benchmark/particles.wgsl.expected.ir.msl
@@ -1,402 +1,254 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: RenderParams = struct @align(16) {
-  modelViewProjectionMatrix:mat4x4<f32> @offset(0)
-  right:vec3<f32> @offset(64)
-  up:vec3<f32> @offset(80)
+#include <metal_stdlib>
+using namespace metal;
+
+struct RenderParams {
+  float4x4 modelViewProjectionMatrix;
+  float3 right;
+  float3 up;
+};
+
+struct SimulationParams {
+  float deltaTime;
+  float4 seed;
+};
+
+template<typename T, size_t N>
+struct tint_array {
+  const constant T& operator[](size_t i) const constant { return elements[i]; }
+  device T& operator[](size_t i) device { return elements[i]; }
+  const device T& operator[](size_t i) const device { return elements[i]; }
+  thread T& operator[](size_t i) thread { return elements[i]; }
+  const thread T& operator[](size_t i) const thread { return elements[i]; }
+  threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+  const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+  T elements[N];
+};
+
+struct Particle {
+  float3 position;
+  float lifetime;
+  float4 color;
+  float3 velocity;
+};
+
+struct Particles {
+  tint_array<Particle, 1> particles;
+};
+
+struct UBO {
+  uint width;
+};
+
+struct Buffer {
+  tint_array<float, 1> weights;
+};
+
+struct tint_module_vars_struct {
+  thread float2* rand_seed;
+  const constant RenderParams* render_params;
+  const constant SimulationParams* sim_params;
+  device Particles* data;
+  texture2d<float, access::sample> tint_symbol;
+  const constant UBO* ubo;
+  const device Buffer* buf_in;
+  device Buffer* buf_out;
+  texture2d<float, access::sample> tex_in;
+  texture2d<float, access::write> tex_out;
+};
+
+struct VertexOutput {
+  float4 position;
+  float4 color;
+  float2 quad_pos;
+};
+
+struct VertexInput {
+  float3 position;
+  float4 color;
+  float2 quad_pos;
+};
+
+struct vs_main_outputs {
+  float4 VertexOutput_position [[position]];
+  float4 VertexOutput_color [[user(locn0)]];
+  float2 VertexOutput_quad_pos [[user(locn1)]];
+};
+
+struct vs_main_inputs {
+  float3 VertexInput_position [[attribute(0)]];
+  float4 VertexInput_color [[attribute(1)]];
+  float2 VertexInput_quad_pos [[attribute(2)]];
+};
+
+struct fs_main_outputs {
+  float4 tint_symbol_1 [[color(0)]];
+};
+
+struct fs_main_inputs {
+  float4 VertexOutput_color [[user(locn0)]];
+  float2 VertexOutput_quad_pos [[user(locn1)]];
+};
+
+float rand(tint_module_vars_struct tint_module_vars) {
+  (*tint_module_vars.rand_seed)[0u] = fract((cos(dot((*tint_module_vars.rand_seed), float2(23.1407794952392578125f, 232.6168975830078125f))) * 136.816802978515625f));
+  (*tint_module_vars.rand_seed)[1u] = fract((cos(dot((*tint_module_vars.rand_seed), float2(54.478565216064453125f, 345.841522216796875f))) * 534.7645263671875f));
+  return (*tint_module_vars.rand_seed)[1u];
 }
 
-VertexOutput = struct @align(16) {
-  position:vec4<f32> @offset(0), @builtin(position)
-  color:vec4<f32> @offset(16), @location(0)
-  quad_pos:vec2<f32> @offset(32), @location(1)
+VertexOutput vs_main_inner(VertexInput in, tint_module_vars_struct tint_module_vars) {
+  float3 quad_pos = (float2x3((*tint_module_vars.render_params).right, (*tint_module_vars.render_params).up) * in.quad_pos);
+  float3 position = (in.position + (quad_pos * 0.00999999977648258209f));
+  VertexOutput out = {};
+  float4x4 const v = (*tint_module_vars.render_params).modelViewProjectionMatrix;
+  out.position = (v * float4(position, 1.0f));
+  out.color = in.color;
+  out.quad_pos = in.quad_pos;
+  return out;
 }
 
-VertexInput = struct @align(16) {
-  position:vec3<f32> @offset(0), @location(0)
-  color:vec4<f32> @offset(16), @location(1)
-  quad_pos:vec2<f32> @offset(32), @location(2)
+float4 fs_main_inner(VertexOutput in) {
+  float4 color = in.color;
+  float const v_1 = color[3u];
+  color[3u] = (v_1 * max((1.0f - length(in.quad_pos)), 0.0f));
+  return color;
 }
 
-SimulationParams = struct @align(16) {
-  deltaTime:f32 @offset(0)
-  seed:vec4<f32> @offset(16)
+void tint_store_and_preserve_padding(device Particle* const target, Particle value_param) {
+  (*target).position = value_param.position;
+  (*target).lifetime = value_param.lifetime;
+  (*target).color = value_param.color;
+  (*target).velocity = value_param.velocity;
 }
 
-Particle = struct @align(16) {
-  position:vec3<f32> @offset(0)
-  lifetime:f32 @offset(12)
-  color:vec4<f32> @offset(16)
-  velocity:vec3<f32> @offset(32)
-}
-
-Particles = struct @align(16) {
-  particles:array<Particle> @offset(0)
-}
-
-UBO = struct @align(4) {
-  width:u32 @offset(0)
-}
-
-Buffer = struct @align(4) {
-  weights:array<f32> @offset(0)
-}
-
-$B1: {  # root
-  %rand_seed:ptr<private, vec2<f32>, read_write> = var
-  %render_params:ptr<uniform, RenderParams, read> = var @binding_point(0, 0)
-  %sim_params:ptr<uniform, SimulationParams, read> = var @binding_point(0, 0)
-  %data:ptr<storage, Particles, read_write> = var @binding_point(0, 1)
-  %tint_symbol:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 2)
-  %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 3)
-  %buf_in:ptr<storage, Buffer, read> = var @binding_point(0, 4)
-  %buf_out:ptr<storage, Buffer, read_write> = var @binding_point(0, 5)
-  %tex_in:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 6)
-  %tex_out:ptr<handle, texture_storage_2d<rgba8unorm, write>, read> = var @binding_point(0, 7)
-}
-
-%rand = func():f32 {
-  $B2: {
-    %12:vec2<f32> = load %rand_seed
-    %13:f32 = dot %12, vec2<f32>(23.1407794952392578125f, 232.6168975830078125f)
-    %14:f32 = cos %13
-    %15:f32 = mul %14, 136.816802978515625f
-    %16:f32 = fract %15
-    store_vector_element %rand_seed, 0u, %16
-    %17:vec2<f32> = load %rand_seed
-    %18:f32 = dot %17, vec2<f32>(54.478565216064453125f, 345.841522216796875f)
-    %19:f32 = cos %18
-    %20:f32 = mul %19, 534.7645263671875f
-    %21:f32 = fract %20
-    store_vector_element %rand_seed, 1u, %21
-    %22:f32 = load_vector_element %rand_seed, 1u
-    ret %22
-  }
-}
-%vs_main = @vertex func(%in:VertexInput):VertexOutput {
-  $B3: {
-    %25:ptr<uniform, vec3<f32>, read> = access %render_params, 1u
-    %26:vec3<f32> = load %25
-    %27:ptr<uniform, vec3<f32>, read> = access %render_params, 2u
-    %28:vec3<f32> = load %27
-    %29:mat2x3<f32> = construct %26, %28
-    %30:vec2<f32> = access %in, 2u
-    %31:vec3<f32> = mul %29, %30
-    %quad_pos:ptr<function, vec3<f32>, read_write> = var, %31
-    %33:vec3<f32> = access %in, 0u
-    %34:vec3<f32> = load %quad_pos
-    %35:vec3<f32> = mul %34, 0.00999999977648258209f
-    %36:vec3<f32> = add %33, %35
-    %position:ptr<function, vec3<f32>, read_write> = var, %36
-    %out:ptr<function, VertexOutput, read_write> = var
-    %39:ptr<function, vec4<f32>, read_write> = access %out, 0u
-    %40:ptr<uniform, mat4x4<f32>, read> = access %render_params, 0u
-    %41:mat4x4<f32> = load %40
-    %42:mat4x4<f32> = let %41
-    %43:vec3<f32> = load %position
-    %44:vec4<f32> = construct %43, 1.0f
-    %45:vec4<f32> = mul %42, %44
-    store %39, %45
-    %46:ptr<function, vec4<f32>, read_write> = access %out, 1u
-    %47:vec4<f32> = access %in, 1u
-    store %46, %47
-    %48:ptr<function, vec2<f32>, read_write> = access %out, 2u
-    %49:vec2<f32> = access %in, 2u
-    store %48, %49
-    %50:VertexOutput = load %out
-    ret %50
-  }
-}
-%fs_main = @fragment func(%in_1:VertexOutput):vec4<f32> [@location(0)] {  # %in_1: 'in'
-  $B4: {
-    %53:vec4<f32> = access %in_1, 1u
-    %color:ptr<function, vec4<f32>, read_write> = var, %53
-    %55:f32 = load_vector_element %color, 3u
-    %56:f32 = let %55
-    %57:vec2<f32> = access %in_1, 2u
-    %58:f32 = length %57
-    %59:f32 = sub 1.0f, %58
-    %60:f32 = max %59, 0.0f
-    %61:f32 = mul %56, %60
-    store_vector_element %color, 3u, %61
-    %62:vec4<f32> = load %color
-    ret %62
-  }
-}
-%simulate = @compute @workgroup_size(64, 1, 1) func(%GlobalInvocationID:vec3<u32> [@global_invocation_id]):void {
-  $B5: {
-    %65:ptr<uniform, vec4<f32>, read> = access %sim_params, 1u
-    %66:vec4<f32> = load %65
-    %67:vec2<f32> = swizzle %66, xy
-    %68:vec2<f32> = let %67
-    %69:vec2<u32> = swizzle %GlobalInvocationID, xy
-    %70:vec2<f32> = convert %69
-    %71:vec2<f32> = add %68, %70
-    %72:ptr<uniform, vec4<f32>, read> = access %sim_params, 1u
-    %73:vec4<f32> = load %72
-    %74:vec2<f32> = swizzle %73, zw
-    %75:vec2<f32> = mul %71, %74
-    store %rand_seed, %75
-    %76:u32 = access %GlobalInvocationID, 0u
-    %idx:u32 = let %76
-    %78:ptr<storage, Particle, read_write> = access %data, 0u, %idx
-    %79:Particle = load %78
-    %particle:ptr<function, Particle, read_write> = var, %79
-    %81:ptr<function, vec3<f32>, read_write> = access %particle, 3u
-    %82:ptr<function, vec3<f32>, read_write> = access %particle, 3u
-    %83:f32 = load_vector_element %82, 2u
-    %84:ptr<uniform, f32, read> = access %sim_params, 0u
-    %85:f32 = load %84
-    %86:f32 = mul %85, 0.5f
-    %87:f32 = sub %83, %86
-    store_vector_element %81, 2u, %87
-    %88:ptr<function, vec3<f32>, read_write> = access %particle, 0u
-    %89:ptr<function, vec3<f32>, read_write> = access %particle, 0u
-    %90:vec3<f32> = load %89
-    %91:ptr<uniform, f32, read> = access %sim_params, 0u
-    %92:f32 = load %91
-    %93:ptr<function, vec3<f32>, read_write> = access %particle, 3u
-    %94:vec3<f32> = load %93
-    %95:vec3<f32> = mul %92, %94
-    %96:vec3<f32> = add %90, %95
-    store %88, %96
-    %97:ptr<function, f32, read_write> = access %particle, 1u
-    %98:ptr<function, f32, read_write> = access %particle, 1u
-    %99:f32 = load %98
-    %100:ptr<uniform, f32, read> = access %sim_params, 0u
-    %101:f32 = load %100
-    %102:f32 = sub %99, %101
-    store %97, %102
-    %103:ptr<function, vec4<f32>, read_write> = access %particle, 2u
-    %104:ptr<function, f32, read_write> = access %particle, 1u
-    %105:f32 = load %104
-    %106:f32 = smoothstep 0.0f, 0.5f, %105
-    store_vector_element %103, 3u, %106
-    %107:ptr<function, f32, read_write> = access %particle, 1u
-    %108:f32 = load %107
-    %109:bool = lt %108, 0.0f
-    if %109 [t: $B6] {  # if_1
-      $B6: {  # true
-        %coord:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(0u)
-        loop [i: $B7, b: $B8, c: $B9] {  # loop_1
-          $B7: {  # initializer
-            %111:texture_2d<f32> = load %tint_symbol
-            %112:u32 = textureNumLevels %111
-            %113:u32 = sub %112, 1u
-            %level:ptr<function, u32, read_write> = var, %113
-            next_iteration  # -> $B8
-          }
-          $B8: {  # body
-            %115:u32 = load %level
-            %116:bool = gt %115, 0u
-            if %116 [t: $B10, f: $B11] {  # if_2
-              $B10: {  # true
-                exit_if  # if_2
-              }
-              $B11: {  # false
-                exit_loop  # loop_1
-              }
-            }
-            %117:texture_2d<f32> = load %tint_symbol
-            %118:vec2<u32> = load %coord
-            %119:u32 = load %level
-            %120:vec4<f32> = textureLoad %117, %118, %119
-            %probabilites:vec4<f32> = let %120
-            %122:f32 = call %rand
-            %123:vec4<f32> = construct %122
-            %value:vec4<f32> = let %123
-            %125:vec3<f32> = swizzle %probabilites, xyz
-            %126:vec4<f32> = construct 0.0f, %125
-            %127:vec4<bool> = gte %value, %126
-            %128:vec4<bool> = lt %value, %probabilites
-            %129:vec4<bool> = and %127, %128
-            %mask:vec4<bool> = let %129
-            %131:vec2<u32> = load %coord
-            %132:vec2<u32> = mul %131, 2u
-            store %coord, %132
-            %133:vec2<bool> = swizzle %mask, yw
-            %134:bool = any %133
-            %135:u32 = select 0u, 1u, %134
-            %136:u32 = load_vector_element %coord, 0u
-            %137:u32 = add %136, %135
-            store_vector_element %coord, 0u, %137
-            %138:vec2<bool> = swizzle %mask, zw
-            %139:bool = any %138
-            %140:u32 = select 0u, 1u, %139
-            %141:u32 = load_vector_element %coord, 1u
-            %142:u32 = add %141, %140
-            store_vector_element %coord, 1u, %142
-            continue  # -> $B9
-          }
-          $B9: {  # continuing
-            %143:u32 = load %level
-            %144:u32 = sub %143, 1u
-            store %level, %144
-            next_iteration  # -> $B8
-          }
+void simulate_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+  float2 const v_2 = (*tint_module_vars.sim_params).seed.xy;
+  float2 const v_3 = (v_2 + float2(GlobalInvocationID.xy));
+  (*tint_module_vars.rand_seed) = (v_3 * (*tint_module_vars.sim_params).seed.zw);
+  uint const idx = GlobalInvocationID[0u];
+  Particle particle = (*tint_module_vars.data).particles[idx];
+  particle.velocity[2u] = (particle.velocity[2u] - ((*tint_module_vars.sim_params).deltaTime * 0.5f));
+  particle.position = (particle.position + ((*tint_module_vars.sim_params).deltaTime * particle.velocity));
+  particle.lifetime = (particle.lifetime - (*tint_module_vars.sim_params).deltaTime);
+  particle.color[3u] = smoothstep(0.0f, 0.5f, particle.lifetime);
+  if ((particle.lifetime < 0.0f)) {
+    uint2 coord = uint2(0u);
+    {
+      uint level = (tint_module_vars.tint_symbol.get_num_mip_levels() - 1u);
+      while(true) {
+        if ((level > 0u)) {
+        } else {
+          break;
         }
-        %145:vec2<u32> = load %coord
-        %146:vec2<f32> = convert %145
-        %147:vec2<f32> = let %146
-        %148:texture_2d<f32> = load %tint_symbol
-        %149:vec2<u32> = textureDimensions %148
-        %150:vec2<f32> = convert %149
-        %151:vec2<f32> = div %147, %150
-        %uv:vec2<f32> = let %151
-        %153:ptr<function, vec3<f32>, read_write> = access %particle, 0u
-        %154:vec2<f32> = sub %uv, 0.5f
-        %155:vec2<f32> = mul %154, 3.0f
-        %156:vec2<f32> = mul %155, vec2<f32>(1.0f, -1.0f)
-        %157:vec3<f32> = construct %156, 0.0f
-        store %153, %157
-        %158:ptr<function, vec4<f32>, read_write> = access %particle, 2u
-        %159:texture_2d<f32> = load %tint_symbol
-        %160:vec2<u32> = load %coord
-        %161:vec4<f32> = textureLoad %159, %160, 0i
-        store %158, %161
-        %162:ptr<function, vec3<f32>, read_write> = access %particle, 3u
-        %163:f32 = call %rand
-        %164:f32 = sub %163, 0.5f
-        %165:f32 = mul %164, 0.10000000149011611938f
-        store_vector_element %162, 0u, %165
-        %166:ptr<function, vec3<f32>, read_write> = access %particle, 3u
-        %167:f32 = call %rand
-        %168:f32 = sub %167, 0.5f
-        %169:f32 = mul %168, 0.10000000149011611938f
-        store_vector_element %166, 1u, %169
-        %170:ptr<function, vec3<f32>, read_write> = access %particle, 3u
-        %171:f32 = call %rand
-        %172:f32 = mul %171, 0.30000001192092895508f
-        store_vector_element %170, 2u, %172
-        %173:ptr<function, f32, read_write> = access %particle, 1u
-        %174:f32 = call %rand
-        %175:f32 = mul %174, 2.0f
-        %176:f32 = add 0.5f, %175
-        store %173, %176
-        exit_if  # if_1
+        float4 const probabilites = tint_module_vars.tint_symbol.read(coord, level);
+        float4 const value = float4(rand(tint_module_vars));
+        bool4 const mask = ((value >= float4(0.0f, probabilites.xyz)) & (value < probabilites));
+        coord = (coord * 2u);
+        uint const v_4 = select(0u, 1u, any(mask.yw));
+        coord[0u] = (coord[0u] + v_4);
+        uint const v_5 = select(0u, 1u, any(mask.zw));
+        coord[1u] = (coord[1u] + v_5);
+        {
+          level = (level - 1u);
+        }
+        continue;
       }
     }
-    %177:ptr<storage, Particle, read_write> = access %data, 0u, %idx
-    %178:Particle = load %particle
-    %179:void = call %tint_store_and_preserve_padding, %177, %178
-    ret
+    float2 const v_6 = float2(coord);
+    uint const v_7 = tint_module_vars.tint_symbol.get_width(0u);
+    float2 const uv = (v_6 / float2(uint2(v_7, tint_module_vars.tint_symbol.get_height(0u))));
+    particle.position = float3((((uv - 0.5f) * 3.0f) * float2(1.0f, -1.0f)), 0.0f);
+    particle.color = tint_module_vars.tint_symbol.read(coord, 0);
+    particle.velocity[0u] = ((rand(tint_module_vars) - 0.5f) * 0.10000000149011611938f);
+    particle.velocity[1u] = ((rand(tint_module_vars) - 0.5f) * 0.10000000149011611938f);
+    particle.velocity[2u] = (rand(tint_module_vars) * 0.30000001192092895508f);
+    particle.lifetime = (0.5f + (rand(tint_module_vars) * 2.0f));
   }
+  tint_store_and_preserve_padding((&(*tint_module_vars.data).particles[idx]), particle);
 }
-%import_level = @compute @workgroup_size(64, 1, 1) func(%coord_1:vec3<u32> [@global_invocation_id]):void {  # %coord_1: 'coord'
-  $B12: {
-    %183:u32 = access %coord_1, 0u
-    %184:u32 = access %coord_1, 1u
-    %185:ptr<uniform, u32, read> = access %ubo, 0u
-    %186:u32 = load %185
-    %187:u32 = mul %184, %186
-    %188:u32 = add %183, %187
-    %offset:u32 = let %188
-    %190:ptr<storage, f32, read_write> = access %buf_out, 0u, %offset
-    %191:texture_2d<f32> = load %tex_in
-    %192:texture_2d<f32> = let %191
-    %193:vec2<u32> = swizzle %coord_1, xy
-    %194:vec2<i32> = convert %193
-    %195:vec4<f32> = textureLoad %192, %194, 0i
-    %196:f32 = access %195, 3u
-    store %190, %196
-    ret
-  }
+
+void import_level_inner(uint3 coord, tint_module_vars_struct tint_module_vars) {
+  uint const offset = (coord[0u] + (coord[1u] * (*tint_module_vars.ubo).width));
+  (*tint_module_vars.buf_out).weights[offset] = tint_module_vars.tex_in.read(uint2(int2(coord.xy)), 0)[3u];
 }
-%export_level = @compute @workgroup_size(64, 1, 1) func(%coord_2:vec3<u32> [@global_invocation_id]):void {  # %coord_2: 'coord'
-  $B13: {
-    %199:vec2<u32> = swizzle %coord_2, xy
-    %200:texture_storage_2d<rgba8unorm, write> = load %tex_out
-    %201:vec2<u32> = textureDimensions %200
-    %202:vec2<u32> = construct %201
-    %203:vec2<bool> = lt %199, %202
-    %204:bool = all %203
-    if %204 [t: $B14] {  # if_3
-      $B14: {  # true
-        %205:u32 = access %coord_2, 0u
-        %206:u32 = access %coord_2, 1u
-        %207:ptr<uniform, u32, read> = access %ubo, 0u
-        %208:u32 = load %207
-        %209:u32 = mul %206, %208
-        %210:u32 = add %205, %209
-        %dst_offset:u32 = let %210
-        %212:u32 = access %coord_2, 0u
-        %213:u32 = mul %212, 2u
-        %214:u32 = access %coord_2, 1u
-        %215:u32 = mul %214, 2u
-        %216:ptr<uniform, u32, read> = access %ubo, 0u
-        %217:u32 = load %216
-        %218:u32 = mul %215, %217
-        %219:u32 = add %213, %218
-        %src_offset:u32 = let %219
-        %221:u32 = add %src_offset, 0u
-        %222:ptr<storage, f32, read> = access %buf_in, 0u, %221
-        %223:f32 = load %222
-        %a:f32 = let %223
-        %225:u32 = add %src_offset, 1u
-        %226:ptr<storage, f32, read> = access %buf_in, 0u, %225
-        %227:f32 = load %226
-        %b:f32 = let %227
-        %229:u32 = add %src_offset, 0u
-        %230:ptr<uniform, u32, read> = access %ubo, 0u
-        %231:u32 = load %230
-        %232:u32 = add %229, %231
-        %233:ptr<storage, f32, read> = access %buf_in, 0u, %232
-        %234:f32 = load %233
-        %c:f32 = let %234
-        %236:u32 = add %src_offset, 1u
-        %237:ptr<uniform, u32, read> = access %ubo, 0u
-        %238:u32 = load %237
-        %239:u32 = add %236, %238
-        %240:ptr<storage, f32, read> = access %buf_in, 0u, %239
-        %241:f32 = load %240
-        %d:f32 = let %241
-        %243:vec4<f32> = construct %a, %b, %c, %d
-        %244:f32 = dot %243, vec4<f32>(1.0f)
-        %sum:f32 = let %244
-        %246:ptr<storage, f32, read_write> = access %buf_out, 0u, %dst_offset
-        %247:f32 = div %sum, 4.0f
-        store %246, %247
-        %248:f32 = add %a, %b
-        %249:f32 = add %a, %b
-        %250:f32 = add %249, %c
-        %251:vec4<f32> = construct %a, %248, %250, %sum
-        %252:vec4<f32> = let %251
-        %253:f32 = max %sum, 0.00009999999747378752f
-        %254:vec4<f32> = div %252, %253
-        %probabilities:vec4<f32> = let %254
-        %256:texture_storage_2d<rgba8unorm, write> = load %tex_out
-        %257:texture_storage_2d<rgba8unorm, write> = let %256
-        %258:vec2<u32> = swizzle %coord_2, xy
-        %259:vec2<i32> = convert %258
-        %260:void = textureStore %257, %259, %probabilities
-        exit_if  # if_3
-      }
-    }
-    ret
-  }
-}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, Particle, read_write>, %value_param:Particle):void {
-  $B15: {
-    %263:ptr<storage, vec3<f32>, read_write> = access %target, 0u
-    %264:vec3<f32> = access %value_param, 0u
-    store %263, %264
-    %265:ptr<storage, f32, read_write> = access %target, 1u
-    %266:f32 = access %value_param, 1u
-    store %265, %266
-    %267:ptr<storage, vec4<f32>, read_write> = access %target, 2u
-    %268:vec4<f32> = access %value_param, 2u
-    store %267, %268
-    %269:ptr<storage, vec3<f32>, read_write> = access %target, 3u
-    %270:vec3<f32> = access %value_param, 3u
-    store %269, %270
-    ret
+
+void export_level_inner(uint3 coord, tint_module_vars_struct tint_module_vars) {
+  uint const v_8 = tint_module_vars.tex_out.get_width(0u);
+  if (all((coord.xy < uint2(uint2(v_8, tint_module_vars.tex_out.get_height(0u)))))) {
+    uint const dst_offset = (coord[0u] + (coord[1u] * (*tint_module_vars.ubo).width));
+    uint const src_offset = ((coord[0u] * 2u) + ((coord[1u] * 2u) * (*tint_module_vars.ubo).width));
+    float const a = (*tint_module_vars.buf_in).weights[(src_offset + 0u)];
+    float const b = (*tint_module_vars.buf_in).weights[(src_offset + 1u)];
+    float const c = (*tint_module_vars.buf_in).weights[((src_offset + 0u) + (*tint_module_vars.ubo).width)];
+    float const d = (*tint_module_vars.buf_in).weights[((src_offset + 1u) + (*tint_module_vars.ubo).width)];
+    float const sum = dot(float4(a, b, c, d), float4(1.0f));
+    (*tint_module_vars.buf_out).weights[dst_offset] = (sum / 4.0f);
+    float4 const v_9 = float4(a, (a + b), ((a + b) + c), sum);
+    float4 const probabilities = (v_9 / max(sum, 0.00009999999747378752f));
+    tint_module_vars.tex_out.write(probabilities, uint2(int2(coord.xy)));
   }
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+vertex vs_main_outputs vs_main(vs_main_inputs inputs [[stage_in]], const constant RenderParams* render_params [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.render_params=render_params};
+  VertexOutput const v_10 = vs_main_inner(VertexInput{.position=inputs.VertexInput_position, .color=inputs.VertexInput_color, .quad_pos=inputs.VertexInput_quad_pos}, tint_module_vars);
+  return vs_main_outputs{.VertexOutput_position=v_10.position, .VertexOutput_color=v_10.color, .VertexOutput_quad_pos=v_10.quad_pos};
+}
+
+fragment fs_main_outputs fs_main(float4 VertexOutput_position [[position]], fs_main_inputs inputs [[stage_in]]) {
+  return fs_main_outputs{.tint_symbol_1=fs_main_inner(VertexOutput{.position=VertexOutput_position, .color=inputs.VertexOutput_color, .quad_pos=inputs.VertexOutput_quad_pos})};
+}
+
+kernel void simulate(uint3 GlobalInvocationID [[thread_position_in_grid]], const constant SimulationParams* sim_params [[buffer(0)]], device Particles* data [[buffer(1)]], texture2d<float, access::sample> tint_symbol [[texture(0)]]) {
+  thread float2 rand_seed = 0.0f;
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.rand_seed=(&rand_seed), .sim_params=sim_params, .data=data, .tint_symbol=tint_symbol};
+  simulate_inner(GlobalInvocationID, tint_module_vars);
+}
+
+kernel void import_level(uint3 coord [[thread_position_in_grid]], const constant UBO* ubo [[buffer(2)]], device Buffer* buf_out [[buffer(3)]], texture2d<float, access::sample> tex_in [[texture(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .buf_out=buf_out, .tex_in=tex_in};
+  import_level_inner(coord, tint_module_vars);
+}
+
+kernel void export_level(uint3 coord [[thread_position_in_grid]], const constant UBO* ubo [[buffer(2)]], const device Buffer* buf_in [[buffer(4)]], device Buffer* buf_out [[buffer(3)]], texture2d<float, access::write> tex_out [[texture(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .buf_in=buf_in, .buf_out=buf_out, .tex_out=tex_out};
+  export_level_inner(coord, tint_module_vars);
+}
+program_source:192:104: error: call to deleted constructor of 'texture2d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.render_params=render_params};
+                                                                                                       ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
+  texture2d() thread = delete;
+  ^
+program_source:51:36: note: in implicit initialization of field 'tint_symbol' with omitted initializer
+  texture2d<float, access::sample> tint_symbol;
+                                   ^
+program_source:203:161: error: call to deleted constructor of 'texture2d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.rand_seed=(&rand_seed), .sim_params=sim_params, .data=data, .tint_symbol=tint_symbol};
+                                                                                                                                                                ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
+  texture2d() thread = delete;
+  ^
+program_source:55:36: note: in implicit initialization of field 'tex_in' with omitted initializer
+  texture2d<float, access::sample> tex_in;
+                                   ^
+program_source:208:118: error: call to deleted constructor of 'texture2d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .buf_out=buf_out, .tex_in=tex_in};
+                                                                                                                     ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
+  texture2d() thread = delete;
+  ^
+program_source:51:36: note: in implicit initialization of field 'tint_symbol' with omitted initializer
+  texture2d<float, access::sample> tint_symbol;
+                                   ^
+program_source:213:136: error: call to deleted constructor of 'texture2d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .buf_in=buf_in, .buf_out=buf_out, .tex_out=tex_out};
+                                                                                                                                       ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
+  texture2d() thread = delete;
+  ^
+program_source:51:36: note: in implicit initialization of field 'tint_symbol' with omitted initializer
+  texture2d<float, access::sample> tint_symbol;
+                                   ^
+
diff --git a/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl b/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl
index f20f319..028ef20 100644
--- a/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl
@@ -1,244 +1,204 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: RenderParams = struct @align(16) {
-  modelViewProjectionMatrix:mat4x4<f32> @offset(0)
-  right:vec3<f32> @offset(64)
-  up:vec3<f32> @offset(80)
+#include <metal_stdlib>
+using namespace metal;
+
+struct VertexOutput {
+  float4 position;
+  float4 color;
+  float2 quad_pos;
+};
+
+struct VertexInput {
+  float3 position;
+  float4 color;
+  float2 quad_pos;
+};
+
+struct RenderParams {
+  float4x4 modelViewProjectionMatrix;
+  float3 right;
+  float3 up;
+};
+
+struct SimulationParams {
+  float deltaTime;
+  float4 seed;
+};
+
+template<typename T, size_t N>
+struct tint_array {
+  const constant T& operator[](size_t i) const constant { return elements[i]; }
+  device T& operator[](size_t i) device { return elements[i]; }
+  const device T& operator[](size_t i) const device { return elements[i]; }
+  thread T& operator[](size_t i) thread { return elements[i]; }
+  const thread T& operator[](size_t i) const thread { return elements[i]; }
+  threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+  const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+  T elements[N];
+};
+
+struct Particle {
+  float3 position;
+  float lifetime;
+  float4 color;
+  float2 velocity;
+};
+
+struct Particles {
+  tint_array<Particle, 1> particles;
+};
+
+struct UBO {
+  uint width;
+};
+
+struct Buffer {
+  tint_array<float, 1> weights;
+};
+
+struct tint_module_vars_struct {
+  thread float2* rand_seed;
+  const constant RenderParams* render_params;
+  const constant SimulationParams* sim_params;
+  device Particles* data;
+  texture1d<float, access::sample> tint_symbol;
+  const constant UBO* ubo;
+  const device Buffer* buf_in;
+  device Buffer* buf_out;
+  texture2d<float, access::sample> tex_in;
+  texture2d<float, access::write> tex_out;
+};
+
+struct vertex_main_outputs {
+  float4 tint_symbol_1 [[position]];
+};
+
+struct vs_main_outputs {
+  float4 VertexOutput_position [[position]];
+  float4 VertexOutput_color [[user(locn0)]];
+  float2 VertexOutput_quad_pos [[user(locn1)]];
+};
+
+struct vs_main_inputs {
+  float3 VertexInput_position [[attribute(0)]];
+  float4 VertexInput_color [[attribute(1)]];
+  float2 VertexInput_quad_pos [[attribute(2)]];
+};
+
+void asinh_468a48() {
+  half arg_0 = 0.0h;
+  half res = asinh(arg_0);
 }
 
-VertexOutput = struct @align(16) {
-  position:vec4<f32> @offset(0), @builtin(position)
-  color:vec4<f32> @offset(16), @location(0)
-  quad_pos:vec2<f32> @offset(32), @location(1)
+float4 vertex_main_inner() {
+  asinh_468a48();
+  return float4(0.0f);
 }
 
-VertexInput = struct @align(16) {
-  position:vec3<f32> @offset(0), @location(0)
-  color:vec4<f32> @offset(16), @location(1)
-  quad_pos:vec2<f32> @offset(32), @location(2)
+fragment void fragment_main() {
+  asinh_468a48();
 }
 
-SimulationParams = struct @align(16) {
-  deltaTime:f32 @offset(0)
-  seed:vec4<f32> @offset(16)
+kernel void rgba32uintin() {
+  asinh_468a48();
 }
 
-Particle = struct @align(16) {
-  position:vec3<f32> @offset(0)
-  lifetime:f32 @offset(12)
-  color:vec4<f32> @offset(16)
-  velocity:vec2<f32> @offset(32)
+VertexOutput vs_main_inner(VertexInput in, tint_module_vars_struct tint_module_vars) {
+  float3 quad_pos = (float2x3((*tint_module_vars.render_params).right, (*tint_module_vars.render_params).up) * in.quad_pos);
+  float3 position = (in.position - (quad_pos + 0.00999999977648258209f));
+  VertexOutput out = {};
+  float4x4 const v = (*tint_module_vars.render_params).modelViewProjectionMatrix;
+  out.position = (v * float4(position, 1.0f));
+  out.color = in.color;
+  out.quad_pos = in.quad_pos;
+  return out;
 }
 
-Particles = struct @align(16) {
-  particles:array<Particle> @offset(0)
+void tint_store_and_preserve_padding(device Particle* const target, Particle value_param) {
+  (*target).position = value_param.position;
+  (*target).lifetime = value_param.lifetime;
+  (*target).color = value_param.color;
+  (*target).velocity = value_param.velocity;
 }
 
-UBO = struct @align(4) {
-  width:u32 @offset(0)
+void simulate_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+  float2 const v_1 = (*tint_module_vars.sim_params).seed.xy;
+  float2 const v_2 = (v_1 * float2(GlobalInvocationID.xy));
+  (*tint_module_vars.rand_seed) = (v_2 * (*tint_module_vars.sim_params).seed.zw);
+  uint const idx = GlobalInvocationID[0u];
+  Particle particle = (*tint_module_vars.data).particles[idx];
+  tint_store_and_preserve_padding((&(*tint_module_vars.data).particles[idx]), particle);
 }
 
-Buffer = struct @align(4) {
-  weights:array<f32> @offset(0)
-}
-
-$B1: {  # root
-  %rand_seed:ptr<private, vec2<f32>, read_write> = var
-  %render_params:ptr<uniform, RenderParams, read> = var @binding_point(0, 5)
-  %sim_params:ptr<uniform, SimulationParams, read> = var @binding_point(0, 0)
-  %data:ptr<storage, Particles, read_write> = var @binding_point(0, 1)
-  %tint_symbol:ptr<handle, texture_1d<f32>, read> = var @binding_point(0, 2)
-  %ubo:ptr<uniform, UBO, read> = var @binding_point(0, 3)
-  %buf_in:ptr<storage, Buffer, read> = var @binding_point(0, 4)
-  %buf_out:ptr<storage, Buffer, read_write> = var @binding_point(0, 5)
-  %tex_in:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 6)
-  %tex_out:ptr<handle, texture_storage_2d<rgba8unorm, write>, read> = var @binding_point(0, 7)
-}
-
-%asinh_468a48 = func():void {
-  $B2: {
-    %arg_0:ptr<function, f16, read_write> = var, 0.0h
-    %13:f16 = load %arg_0
-    %14:f16 = asinh %13
-    %res:ptr<function, f16, read_write> = var, %14
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %17:void = call %asinh_468a48
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %19:void = call %asinh_468a48
-    ret
-  }
-}
-%rgba32uintin = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %21:void = call %asinh_468a48
-    ret
-  }
-}
-%vs_main = @vertex func(%in:VertexInput):VertexOutput {
-  $B6: {
-    %24:ptr<uniform, vec3<f32>, read> = access %render_params, 1u
-    %25:vec3<f32> = load %24
-    %26:ptr<uniform, vec3<f32>, read> = access %render_params, 2u
-    %27:vec3<f32> = load %26
-    %28:mat2x3<f32> = construct %25, %27
-    %29:vec2<f32> = access %in, 2u
-    %30:vec3<f32> = mul %28, %29
-    %quad_pos:ptr<function, vec3<f32>, read_write> = var, %30
-    %32:vec3<f32> = access %in, 0u
-    %33:vec3<f32> = load %quad_pos
-    %34:vec3<f32> = add %33, 0.00999999977648258209f
-    %35:vec3<f32> = sub %32, %34
-    %position:ptr<function, vec3<f32>, read_write> = var, %35
-    %out:ptr<function, VertexOutput, read_write> = var
-    %38:ptr<function, vec4<f32>, read_write> = access %out, 0u
-    %39:ptr<uniform, mat4x4<f32>, read> = access %render_params, 0u
-    %40:mat4x4<f32> = load %39
-    %41:mat4x4<f32> = let %40
-    %42:vec3<f32> = load %position
-    %43:vec4<f32> = construct %42, 1.0f
-    %44:vec4<f32> = mul %41, %43
-    store %38, %44
-    %45:ptr<function, vec4<f32>, read_write> = access %out, 1u
-    %46:vec4<f32> = access %in, 1u
-    store %45, %46
-    %47:ptr<function, vec2<f32>, read_write> = access %out, 2u
-    %48:vec2<f32> = access %in, 2u
-    store %47, %48
-    %49:VertexOutput = load %out
-    ret %49
-  }
-}
-%simulate = @compute @workgroup_size(64, 1, 1) func(%GlobalInvocationID:vec3<u32> [@global_invocation_id]):void {
-  $B7: {
-    %52:ptr<uniform, vec4<f32>, read> = access %sim_params, 1u
-    %53:vec4<f32> = load %52
-    %54:vec2<f32> = swizzle %53, xy
-    %55:vec2<f32> = let %54
-    %56:vec2<u32> = swizzle %GlobalInvocationID, xy
-    %57:vec2<f32> = convert %56
-    %58:vec2<f32> = mul %55, %57
-    %59:ptr<uniform, vec4<f32>, read> = access %sim_params, 1u
-    %60:vec4<f32> = load %59
-    %61:vec2<f32> = swizzle %60, zw
-    %62:vec2<f32> = mul %58, %61
-    store %rand_seed, %62
-    %63:u32 = access %GlobalInvocationID, 0u
-    %idx:u32 = let %63
-    %65:ptr<storage, Particle, read_write> = access %data, 0u, %idx
-    %66:Particle = load %65
-    %particle:ptr<function, Particle, read_write> = var, %66
-    %68:ptr<storage, Particle, read_write> = access %data, 0u, %idx
-    %69:Particle = load %particle
-    %70:void = call %tint_store_and_preserve_padding, %68, %69
-    ret
-  }
-}
-%export_level = @compute @workgroup_size(64, 1, 1) func(%coord:vec3<u32> [@global_invocation_id]):void {
-  $B8: {
-    %74:vec2<u32> = swizzle %coord, xy
-    %75:texture_storage_2d<rgba8unorm, write> = load %tex_out
-    %76:vec2<u32> = textureDimensions %75
-    %77:vec2<u32> = construct %76
-    %78:vec2<bool> = lt %74, %77
-    %79:bool = all %78
-    if %79 [t: $B9] {  # if_1
-      $B9: {  # true
-        %80:u32 = access %coord, 0u
-        %81:u32 = access %coord, 1u
-        %82:ptr<uniform, u32, read> = access %ubo, 0u
-        %83:u32 = load %82
-        %84:u32 = mul %81, %83
-        %85:u32 = and %84, 31u
-        %86:u32 = shl %80, %85
-        %dst_offset:u32 = let %86
-        %88:u32 = access %coord, 0u
-        %89:u32 = sub %88, 2u
-        %90:u32 = access %coord, 1u
-        %91:u32 = and 2u, 31u
-        %92:u32 = shr %90, %91
-        %93:ptr<uniform, u32, read> = access %ubo, 0u
-        %94:u32 = load %93
-        %95:u32 = mul %92, %94
-        %96:u32 = add %89, %95
-        %src_offset:u32 = let %96
-        %98:u32 = and 0u, 31u
-        %99:u32 = shl %src_offset, %98
-        %100:ptr<storage, f32, read> = access %buf_in, 0u, %99
-        %101:f32 = load %100
-        %a:f32 = let %101
-        %103:u32 = add %src_offset, 1u
-        %104:ptr<storage, f32, read> = access %buf_in, 0u, %103
-        %105:f32 = load %104
-        %b:f32 = let %105
-        %107:u32 = add %src_offset, 1u
-        %108:ptr<uniform, u32, read> = access %ubo, 0u
-        %109:u32 = load %108
-        %110:u32 = add %107, %109
-        %111:ptr<storage, f32, read> = access %buf_in, 0u, %110
-        %112:f32 = load %111
-        %c:f32 = let %112
-        %114:u32 = add %src_offset, 1u
-        %115:ptr<uniform, u32, read> = access %ubo, 0u
-        %116:u32 = load %115
-        %117:u32 = add %114, %116
-        %118:ptr<storage, f32, read> = access %buf_in, 0u, %117
-        %119:f32 = load %118
-        %d:f32 = let %119
-        %121:vec4<f32> = construct %a, %b, %c, %d
-        %122:f32 = dot %121, vec4<f32>(1.0f)
-        %sum:f32 = let %122
-        %124:ptr<storage, f32, read_write> = access %buf_out, 0u, %dst_offset
-        %125:f32 = mod %sum, 4.0f
-        store %124, %125
-        %126:f32 = mul %a, %b
-        %127:f32 = div %a, %b
-        %128:f32 = add %127, %c
-        %129:vec4<f32> = construct %a, %126, %128, %sum
-        %130:vec4<f32> = let %129
-        %131:f32 = max %sum, 0.0f
-        %132:vec4<f32> = add %130, %131
-        %probabilities:vec4<f32> = let %132
-        %134:texture_storage_2d<rgba8unorm, write> = load %tex_out
-        %135:texture_storage_2d<rgba8unorm, write> = let %134
-        %136:vec2<u32> = swizzle %coord, xy
-        %137:vec2<i32> = convert %136
-        %138:void = textureStore %135, %137, %probabilities
-        exit_if  # if_1
-      }
-    }
-    ret
-  }
-}
-%tint_store_and_preserve_padding = func(%target:ptr<storage, Particle, read_write>, %value_param:Particle):void {
-  $B10: {
-    %141:ptr<storage, vec3<f32>, read_write> = access %target, 0u
-    %142:vec3<f32> = access %value_param, 0u
-    store %141, %142
-    %143:ptr<storage, f32, read_write> = access %target, 1u
-    %144:f32 = access %value_param, 1u
-    store %143, %144
-    %145:ptr<storage, vec4<f32>, read_write> = access %target, 2u
-    %146:vec4<f32> = access %value_param, 2u
-    store %145, %146
-    %147:ptr<storage, vec2<f32>, read_write> = access %target, 3u
-    %148:vec2<f32> = access %value_param, 3u
-    store %147, %148
-    ret
+void export_level_inner(uint3 coord, tint_module_vars_struct tint_module_vars) {
+  uint const v_3 = tint_module_vars.tex_out.get_width(0u);
+  if (all((coord.xy < uint2(uint2(v_3, tint_module_vars.tex_out.get_height(0u)))))) {
+    uint const dst_offset = (coord[0u] << ((coord[1u] * (*tint_module_vars.ubo).width) & 31u));
+    uint const src_offset = ((coord[0u] - 2u) + ((coord[1u] >> (2u & 31u)) * (*tint_module_vars.ubo).width));
+    float const a = (*tint_module_vars.buf_in).weights[(src_offset << (0u & 31u))];
+    float const b = (*tint_module_vars.buf_in).weights[(src_offset + 1u)];
+    float const c = (*tint_module_vars.buf_in).weights[((src_offset + 1u) + (*tint_module_vars.ubo).width)];
+    float const d = (*tint_module_vars.buf_in).weights[((src_offset + 1u) + (*tint_module_vars.ubo).width)];
+    float const sum = dot(float4(a, b, c, d), float4(1.0f));
+    (*tint_module_vars.buf_out).weights[dst_offset] = (sum % 4.0f);
+    float4 const v_4 = float4(a, (a * b), ((a / b) + c), sum);
+    float4 const probabilities = (v_4 + max(sum, 0.0f));
+    tint_module_vars.tex_out.write(probabilities, uint2(int2(coord.xy)));
   }
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+vertex vertex_main_outputs vertex_main() {
+  return vertex_main_outputs{.tint_symbol_1=vertex_main_inner()};
+}
+
+vertex vs_main_outputs vs_main(vs_main_inputs inputs [[stage_in]], const constant RenderParams* render_params [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.render_params=render_params};
+  VertexOutput const v_5 = vs_main_inner(VertexInput{.position=inputs.VertexInput_position, .color=inputs.VertexInput_color, .quad_pos=inputs.VertexInput_quad_pos}, tint_module_vars);
+  return vs_main_outputs{.VertexOutput_position=v_5.position, .VertexOutput_color=v_5.color, .VertexOutput_quad_pos=v_5.quad_pos};
+}
+
+kernel void simulate(uint3 GlobalInvocationID [[thread_position_in_grid]], const constant SimulationParams* sim_params [[buffer(1)]], device Particles* data [[buffer(2)]]) {
+  thread float2 rand_seed = 0.0f;
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.rand_seed=(&rand_seed), .sim_params=sim_params, .data=data};
+  simulate_inner(GlobalInvocationID, tint_module_vars);
+}
+
+kernel void export_level(uint3 coord [[thread_position_in_grid]], const constant UBO* ubo [[buffer(3)]], const device Buffer* buf_in [[buffer(4)]], device Buffer* buf_out [[buffer(0)]], texture2d<float, access::write> tex_out [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .buf_in=buf_in, .buf_out=buf_out, .tex_out=tex_out};
+  export_level_inner(coord, tint_module_vars);
+}
+program_source:89:8: warning: unused variable 'res' [-Wunused-variable]
+  half res = asinh(arg_0);
+       ^
+program_source:142:60: error: invalid operands to binary expression ('const float' and 'float')
+    (*tint_module_vars.buf_out).weights[dst_offset] = (sum % 4.0f);
+                                                       ~~~ ^ ~~~~
+program_source:154:104: error: call to deleted constructor of 'texture1d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.render_params=render_params};
+                                                                                                       ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:2308:3: note: 'texture1d' has been explicitly marked deleted here
+  texture1d() thread = delete;
+  ^
+program_source:63:36: note: in implicit initialization of field 'tint_symbol' with omitted initializer
+  texture1d<float, access::sample> tint_symbol;
+                                   ^
+program_source:161:135: error: call to deleted constructor of 'texture1d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.rand_seed=(&rand_seed), .sim_params=sim_params, .data=data};
+                                                                                                                                      ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:2308:3: note: 'texture1d' has been explicitly marked deleted here
+  texture1d() thread = delete;
+  ^
+program_source:63:36: note: in implicit initialization of field 'tint_symbol' with omitted initializer
+  texture1d<float, access::sample> tint_symbol;
+                                   ^
+program_source:166:136: error: call to deleted constructor of 'texture1d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ubo=ubo, .buf_in=buf_in, .buf_out=buf_out, .tex_out=tex_out};
+                                                                                                                                       ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:2308:3: note: 'texture1d' has been explicitly marked deleted here
+  texture1d() thread = delete;
+  ^
+program_source:63:36: note: in implicit initialization of field 'tint_symbol' with omitted initializer
+  texture1d<float, access::sample> tint_symbol;
+                                   ^
+
diff --git a/test/tint/bug/dawn/947.wgsl.expected.ir.msl b/test/tint/bug/dawn/947.wgsl.expected.ir.msl
index e2287b6..40d3a71 100644
--- a/test/tint/bug/dawn/947.wgsl.expected.ir.msl
+++ b/test/tint/bug/dawn/947.wgsl.expected.ir.msl
@@ -2,20 +2,24 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct VertexOutputs {
   float2 texcoords;
   float4 position;
 };
+
 struct Uniforms {
   float2 u_scale;
   float2 u_offset;
 };
+
 struct tint_module_vars_struct {
   const constant Uniforms* uniforms;
   sampler mySampler;
   texture2d<float, access::sample> myTexture;
   thread bool* continue_execution;
 };
+
 template<typename T, size_t N>
 struct tint_array {
   const constant T& operator[](size_t i) const constant { return elements[i]; }
@@ -32,9 +36,11 @@
   float2 VertexOutputs_texcoords [[user(locn0)]];
   float4 VertexOutputs_position [[position]];
 };
+
 struct fs_main_outputs {
   float4 tint_symbol [[color(0)]];
 };
+
 struct fs_main_inputs {
   float2 texcoord [[user(locn0)]];
 };
@@ -51,6 +57,7 @@
   }
   return output;
 }
+
 float4 fs_main_inner(float2 texcoord, tint_module_vars_struct tint_module_vars) {
   float2 clampedTexcoord = clamp(texcoord, float2(0.0f), float2(1.0f));
   if (!(all((clampedTexcoord == texcoord)))) {
@@ -62,32 +69,34 @@
   }
   return srcColor;
 }
+
 vertex vs_main_outputs vs_main(uint VertexIndex [[vertex_id]], const constant Uniforms* uniforms [[buffer(0)]]) {
   tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
   VertexOutputs const v = vs_main_inner(VertexIndex, tint_module_vars);
   return vs_main_outputs{.VertexOutputs_texcoords=v.texcoords, .VertexOutputs_position=v.position};
 }
+
 fragment fs_main_outputs fs_main(fs_main_inputs inputs [[stage_in]]) {
   thread bool continue_execution = true;
   tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.continue_execution=(&continue_execution)};
   return fs_main_outputs{.tint_symbol=fs_main_inner(inputs.texcoord, tint_module_vars)};
 }
-program_source:64:94: error: call to deleted constructor of 'texture2d<float, access::sample>'
+program_source:72:94: error: call to deleted constructor of 'texture2d<float, access::sample>'
   tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms};
                                                                                              ^
 /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
   texture2d() thread = delete;
   ^
-program_source:14:36: note: in implicit initialization of field 'myTexture' with omitted initializer
+program_source:17:36: note: in implicit initialization of field 'myTexture' with omitted initializer
   texture2d<float, access::sample> myTexture;
                                    ^
-program_source:70:117: error: call to deleted constructor of 'texture2d<float, access::sample>'
+program_source:79:117: error: call to deleted constructor of 'texture2d<float, access::sample>'
   tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.continue_execution=(&continue_execution)};
                                                                                                                     ^
 /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
   texture2d() thread = delete;
   ^
-program_source:14:36: note: in implicit initialization of field 'myTexture' with omitted initializer
+program_source:17:36: note: in implicit initialization of field 'myTexture' with omitted initializer
   texture2d<float, access::sample> myTexture;
                                    ^
 
diff --git a/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl b/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl
index 8d2fb0e..55a628e 100644
--- a/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl
+++ b/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl
@@ -2,14 +2,17 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct tint_module_vars_struct {
   sampler Sampler;
   texture2d<float, access::sample> randomTexture;
   texture2d<float, access::sample> depthTexture;
 };
+
 struct tint_symbol_outputs {
   float4 tint_symbol_1 [[color(0)]];
 };
+
 struct tint_symbol_inputs {
   float2 vUV [[user(locn0)]];
 };
@@ -57,20 +60,21 @@
   }
   return float4(1.0f);
 }
+
 fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], sampler Sampler [[sampler(0)]], texture2d<float, access::sample> randomTexture [[texture(0)]]) {
   tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Sampler=Sampler, .randomTexture=randomTexture};
   return tint_symbol_outputs{.tint_symbol_1=tint_symbol_inner(inputs.vUV, tint_module_vars)};
 }
-program_source:49:19: warning: unused variable 'sampleDepth' [-Wunused-variable]
+program_source:52:19: warning: unused variable 'sampleDepth' [-Wunused-variable]
       float const sampleDepth = 0.0f;
                   ^
-program_source:59:122: error: call to deleted constructor of 'texture2d<float, access::sample>'
+program_source:63:122: error: call to deleted constructor of 'texture2d<float, access::sample>'
   tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Sampler=Sampler, .randomTexture=randomTexture};
                                                                                                                          ^
 /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
   texture2d() thread = delete;
   ^
-program_source:6:36: note: in implicit initialization of field 'depthTexture' with omitted initializer
+program_source:7:36: note: in implicit initialization of field 'depthTexture' with omitted initializer
   texture2d<float, access::sample> depthTexture;
                                    ^
 
diff --git a/test/tint/bug/tint/1540.wgsl.expected.ir.msl b/test/tint/bug/tint/1540.wgsl.expected.ir.msl
index e05be48..b650ca3 100644
--- a/test/tint/bug/tint/1540.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1540.wgsl.expected.ir.msl
@@ -2,22 +2,23 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct S {
   bool e;
 };
 
 kernel void tint_symbol() {
   bool b = false;
-  S v = {.e=(true & b)};
+  S v = S{.e=(true & b)};
 }
-program_source:9:13: error: non-constant-expression cannot be narrowed from type 'int' to 'bool' in initializer list [-Wc++11-narrowing]
-  S v = {.e=(true & b)};
-            ^~~~~~~~~~
-program_source:9:13: note: insert an explicit cast to silence this issue
-  S v = {.e=(true & b)};
-            ^~~~~~~~~~
-            static_cast<bool>( )
-program_source:9:5: warning: unused variable 'v' [-Wunused-variable]
-  S v = {.e=(true & b)};
+program_source:10:14: error: non-constant-expression cannot be narrowed from type 'int' to 'bool' in initializer list [-Wc++11-narrowing]
+  S v = S{.e=(true & b)};
+             ^~~~~~~~~~
+program_source:10:14: note: insert an explicit cast to silence this issue
+  S v = S{.e=(true & b)};
+             ^~~~~~~~~~
+             static_cast<bool>( )
+program_source:10:5: warning: unused variable 'v' [-Wunused-variable]
+  S v = S{.e=(true & b)};
     ^
 
diff --git a/test/tint/bug/tint/749.spvasm.expected.ir.msl b/test/tint/bug/tint/749.spvasm.expected.ir.msl
index 4dc6699..49ff2dd 100644
--- a/test/tint/bug/tint/749.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/749.spvasm.expected.ir.msl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
-
-
 error: line:256: ID '172' decorated with NoContraction multiple times is not allowed.
   %172 = OpIMul %int %168 %171
 
+
+
diff --git a/test/tint/bug/tint/948.wgsl.expected.ir.msl b/test/tint/bug/tint/948.wgsl.expected.ir.msl
index 9dfc9b8..65f1035 100644
--- a/test/tint/bug/tint/948.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/948.wgsl.expected.ir.msl
@@ -1,462 +1,272 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: LeftOver = struct @align(16) {
-  time:f32 @offset(0)
-  padding:u32 @offset(4)
-  worldViewProjection:mat4x4<f32> @offset(16)
-  outputSize:vec2<f32> @offset(80)
-  stageSize:vec2<f32> @offset(88)
-  spriteMapSize:vec2<f32> @offset(96)
-  stageScale:f32 @offset(104)
-  spriteCount:f32 @offset(108)
-  colorMul:vec3<f32> @offset(112)
+#include <metal_stdlib>
+using namespace metal;
+
+struct LeftOver {
+  float time;
+  uint padding;
+  float4x4 worldViewProjection;
+  float2 outputSize;
+  float2 stageSize;
+  float2 spriteMapSize;
+  float stageScale;
+  float spriteCount;
+  float3 colorMul;
+};
+
+struct tint_module_vars_struct {
+  const constant LeftOver* x_20;
+  texture2d<float, access::sample> frameMapTexture;
+  sampler frameMapSampler;
+  thread float2* tUV;
+  texture2d<float, access::sample> tileMapsTexture0;
+  sampler tileMapsSampler;
+  texture2d<float, access::sample> tileMapsTexture1;
+  texture2d<float, access::sample> animationMapTexture;
+  sampler animationMapSampler;
+  thread float* mt;
+  texture2d<float, access::sample> spriteSheetTexture;
+  sampler spriteSheetSampler;
+  thread float4* glFragColor;
+  thread float2* tileID_1;
+  thread float2* levelUnits;
+  thread float2* stageUnits_1;
+  thread float3* vPosition;
+  thread float2* vUV;
+};
+
+struct main_out {
+  float4 glFragColor_1;
+};
+
+struct tint_symbol_outputs {
+  float4 main_out_glFragColor_1 [[color(0)]];
+};
+
+struct tint_symbol_inputs {
+  float2 tUV_param [[user(locn2)]];
+  float2 tileID_1_param [[user(locn5)]];
+  float2 levelUnits_param [[user(locn4)]];
+  float2 stageUnits_1_param [[user(locn3)]];
+  float3 vPosition_param [[user(locn0)]];
+  float2 vUV_param [[user(locn1)]];
+};
+
+float4x4 getFrameData_f1_(thread float* const frameID, tint_module_vars_struct tint_module_vars) {
+  float fX = 0.0f;
+  float const x_15 = (*frameID);
+  float const x_25 = (*tint_module_vars.x_20).spriteCount;
+  fX = (x_15 / x_25);
+  float const x_37 = fX;
+  float2 const v = float2(x_37, 0.0f);
+  float4 const x_40 = tint_module_vars.frameMapTexture.sample(tint_module_vars.frameMapSampler, v, bias(0.0f));
+  float const x_44 = fX;
+  float2 const v_1 = float2(x_44, 0.25f);
+  float4 const x_47 = tint_module_vars.frameMapTexture.sample(tint_module_vars.frameMapSampler, v_1, bias(0.0f));
+  float const x_51 = fX;
+  float2 const v_2 = float2(x_51, 0.5f);
+  float4 const x_54 = tint_module_vars.frameMapTexture.sample(tint_module_vars.frameMapSampler, v_2, bias(0.0f));
+  float4 const v_3 = float4(x_40[0u], x_40[1u], x_40[2u], x_40[3u]);
+  float4 const v_4 = float4(x_47[0u], x_47[1u], x_47[2u], x_47[3u]);
+  return float4x4(v_3, v_4, float4(x_54[0u], x_54[1u], x_54[2u], x_54[3u]), float4(0.0f));
 }
 
-main_out = struct @align(16) {
-  glFragColor_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: {  # root
-  %x_20:ptr<uniform, LeftOver, read> = var @binding_point(2, 9)
-  %frameMapTexture:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 3)
-  %frameMapSampler:ptr<handle, sampler, read> = var @binding_point(2, 2)
-  %tUV:ptr<private, vec2<f32>, read_write> = var
-  %tileMapsTexture0:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 5)
-  %tileMapsSampler:ptr<handle, sampler, read> = var @binding_point(2, 4)
-  %tileMapsTexture1:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 6)
-  %animationMapTexture:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 8)
-  %animationMapSampler:ptr<handle, sampler, read> = var @binding_point(2, 7)
-  %mt:ptr<private, f32, read_write> = var
-  %spriteSheetTexture:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 1)
-  %spriteSheetSampler:ptr<handle, sampler, read> = var @binding_point(2, 0)
-  %glFragColor:ptr<private, vec4<f32>, read_write> = var
-  %tileID_1:ptr<private, vec2<f32>, read_write> = var
-  %levelUnits:ptr<private, vec2<f32>, read_write> = var
-  %stageUnits_1:ptr<private, vec2<f32>, read_write> = var
-  %vPosition:ptr<private, vec3<f32>, read_write> = var
-  %vUV:ptr<private, vec2<f32>, read_write> = var
-}
-
-%getFrameData_f1_ = func(%frameID:ptr<function, f32, read_write>):mat4x4<f32> {
-  $B2: {
-    %fX:ptr<function, f32, read_write> = var
-    %22:f32 = load %frameID
-    %x_15:f32 = let %22
-    %24:ptr<uniform, f32, read> = access %x_20, 7u
-    %25:f32 = load %24
-    %x_25:f32 = let %25
-    %27:f32 = div %x_15, %x_25
-    store %fX, %27
-    %28:f32 = load %fX
-    %x_37:f32 = let %28
-    %30:texture_2d<f32> = load %frameMapTexture
-    %31:texture_2d<f32> = let %30
-    %32:sampler = load %frameMapSampler
-    %33:sampler = let %32
-    %34:vec2<f32> = construct %x_37, 0.0f
-    %35:vec4<f32> = textureSampleBias %31, %33, %34, 0.0f
-    %x_40:vec4<f32> = let %35
-    %37:f32 = load %fX
-    %x_44:f32 = let %37
-    %39:texture_2d<f32> = load %frameMapTexture
-    %40:texture_2d<f32> = let %39
-    %41:sampler = load %frameMapSampler
-    %42:sampler = let %41
-    %43:vec2<f32> = construct %x_44, 0.25f
-    %44:vec4<f32> = textureSampleBias %40, %42, %43, 0.0f
-    %x_47:vec4<f32> = let %44
-    %46:f32 = load %fX
-    %x_51:f32 = let %46
-    %48:texture_2d<f32> = load %frameMapTexture
-    %49:texture_2d<f32> = let %48
-    %50:sampler = load %frameMapSampler
-    %51:sampler = let %50
-    %52:vec2<f32> = construct %x_51, 0.5f
-    %53:vec4<f32> = textureSampleBias %49, %51, %52, 0.0f
-    %x_54:vec4<f32> = let %53
-    %55:f32 = access %x_40, 0u
-    %56:f32 = access %x_40, 1u
-    %57:f32 = access %x_40, 2u
-    %58:f32 = access %x_40, 3u
-    %59:vec4<f32> = construct %55, %56, %57, %58
-    %60:vec4<f32> = let %59
-    %61:f32 = access %x_47, 0u
-    %62:f32 = access %x_47, 1u
-    %63:f32 = access %x_47, 2u
-    %64:f32 = access %x_47, 3u
-    %65:vec4<f32> = construct %61, %62, %63, %64
-    %66:vec4<f32> = let %65
-    %67:f32 = access %x_54, 0u
-    %68:f32 = access %x_54, 1u
-    %69:f32 = access %x_54, 2u
-    %70:f32 = access %x_54, 3u
-    %71:vec4<f32> = construct %67, %68, %69, %70
-    %72:mat4x4<f32> = construct %60, %66, %71, vec4<f32>(0.0f)
-    ret %72
-  }
-}
-%main_1 = func():void {
-  $B3: {
-    %color:ptr<function, vec4<f32>, read_write> = var
-    %tileUV:ptr<function, vec2<f32>, read_write> = var
-    %tileID:ptr<function, vec2<f32>, read_write> = var
-    %sheetUnits:ptr<function, vec2<f32>, read_write> = var
-    %spriteUnits:ptr<function, f32, read_write> = var
-    %stageUnits:ptr<function, vec2<f32>, read_write> = var
-    %i:ptr<function, i32, read_write> = var
-    %frameID_1:ptr<function, f32, read_write> = var
-    %animationData:ptr<function, vec4<f32>, read_write> = var
-    %f:ptr<function, f32, read_write> = var
-    %frameData:ptr<function, mat4x4<f32>, read_write> = var
-    %param:ptr<function, f32, read_write> = var
-    %frameSize:ptr<function, vec2<f32>, read_write> = var
-    %offset_1:ptr<function, vec2<f32>, read_write> = var
-    %ratio:ptr<function, vec2<f32>, read_write> = var
-    %nc:ptr<function, vec4<f32>, read_write> = var
-    %alpha:ptr<function, f32, read_write> = var
-    %mixed:ptr<function, vec3<f32>, read_write> = var
-    store %color, vec4<f32>(0.0f)
-    %92:vec2<f32> = load %tUV
-    %x_86:vec2<f32> = let %92
-    %94:vec2<f32> = fract %x_86
-    store %tileUV, %94
-    %95:f32 = load_vector_element %tileUV, 1u
-    %x_91:f32 = let %95
-    %97:f32 = sub 1.0f, %x_91
-    store_vector_element %tileUV, 1u, %97
-    %98:vec2<f32> = load %tUV
-    %x_95:vec2<f32> = let %98
-    %100:vec2<f32> = floor %x_95
-    store %tileID, %100
-    %101:ptr<uniform, vec2<f32>, read> = access %x_20, 5u
-    %102:vec2<f32> = load %101
-    %x_101:vec2<f32> = let %102
-    %104:vec2<f32> = div vec2<f32>(1.0f), %x_101
-    store %sheetUnits, %104
-    %105:ptr<uniform, f32, read> = access %x_20, 7u
-    %106:f32 = load %105
-    %x_106:f32 = let %106
-    %108:f32 = div 1.0f, %x_106
-    store %spriteUnits, %108
-    %109:ptr<uniform, vec2<f32>, read> = access %x_20, 4u
-    %110:vec2<f32> = load %109
-    %x_111:vec2<f32> = let %110
-    %112:vec2<f32> = div vec2<f32>(1.0f), %x_111
-    store %stageUnits, %112
-    store %i, 0i
-    loop [b: $B4, c: $B5] {  # loop_1
-      $B4: {  # body
-        %113:i32 = load %i
-        %x_122:i32 = let %113
-        %115:bool = lt %x_122, 2i
-        if %115 [t: $B6, f: $B7] {  # if_1
-          $B6: {  # true
-            exit_if  # if_1
-          }
-          $B7: {  # false
-            exit_loop  # loop_1
-          }
+void main_1(tint_module_vars_struct tint_module_vars) {
+  float4 color = 0.0f;
+  float2 tileUV = 0.0f;
+  float2 tileID = 0.0f;
+  float2 sheetUnits = 0.0f;
+  float spriteUnits = 0.0f;
+  float2 stageUnits = 0.0f;
+  int i = 0;
+  float frameID_1 = 0.0f;
+  float4 animationData = 0.0f;
+  float f = 0.0f;
+  float4x4 frameData = float4x4(0.0f);
+  float param = 0.0f;
+  float2 frameSize = 0.0f;
+  float2 offset_1 = 0.0f;
+  float2 ratio = 0.0f;
+  float4 nc = 0.0f;
+  float alpha = 0.0f;
+  float3 mixed = 0.0f;
+  color = float4(0.0f);
+  float2 const x_86 = (*tint_module_vars.tUV);
+  tileUV = fract(x_86);
+  float const x_91 = tileUV[1u];
+  tileUV[1u] = (1.0f - x_91);
+  float2 const x_95 = (*tint_module_vars.tUV);
+  tileID = floor(x_95);
+  float2 const x_101 = (*tint_module_vars.x_20).spriteMapSize;
+  sheetUnits = (float2(1.0f) / x_101);
+  float const x_106 = (*tint_module_vars.x_20).spriteCount;
+  spriteUnits = (1.0f / x_106);
+  float2 const x_111 = (*tint_module_vars.x_20).stageSize;
+  stageUnits = (float2(1.0f) / x_111);
+  i = 0;
+  {
+    while(true) {
+      int const x_122 = i;
+      if ((x_122 < 2)) {
+      } else {
+        break;
+      }
+      int const x_126 = i;
+      switch(x_126) {
+        case 1:
+        {
+          float2 const x_150 = tileID;
+          float2 const x_154 = (*tint_module_vars.x_20).stageSize;
+          float4 const x_156 = tint_module_vars.tileMapsTexture1.sample(tint_module_vars.tileMapsSampler, ((x_150 + float2(0.5f)) / x_154), bias(0.0f));
+          frameID_1 = x_156[0u];
+          break;
         }
-        %116:i32 = load %i
-        %x_126:i32 = let %116
-        switch %x_126 [c: (1i, $B8), c: (0i, $B9), c: (default, $B10)] {  # switch_1
-          $B8: {  # case
-            %118:vec2<f32> = load %tileID
-            %x_150:vec2<f32> = let %118
-            %120:ptr<uniform, vec2<f32>, read> = access %x_20, 4u
-            %121:vec2<f32> = load %120
-            %x_154:vec2<f32> = let %121
-            %123:texture_2d<f32> = load %tileMapsTexture1
-            %124:sampler = load %tileMapsSampler
-            %125:vec2<f32> = add %x_150, vec2<f32>(0.5f)
-            %126:vec2<f32> = div %125, %x_154
-            %127:vec4<f32> = textureSampleBias %123, %124, %126, 0.0f
-            %x_156:vec4<f32> = let %127
-            %129:f32 = access %x_156, 0u
-            store %frameID_1, %129
-            exit_switch  # switch_1
-          }
-          $B9: {  # case
-            %130:vec2<f32> = load %tileID
-            %x_136:vec2<f32> = let %130
-            %132:ptr<uniform, vec2<f32>, read> = access %x_20, 4u
-            %133:vec2<f32> = load %132
-            %x_140:vec2<f32> = let %133
-            %135:texture_2d<f32> = load %tileMapsTexture0
-            %136:sampler = load %tileMapsSampler
-            %137:vec2<f32> = add %x_136, vec2<f32>(0.5f)
-            %138:vec2<f32> = div %137, %x_140
-            %139:vec4<f32> = textureSampleBias %135, %136, %138, 0.0f
-            %x_142:vec4<f32> = let %139
-            %141:f32 = access %x_142, 0u
-            store %frameID_1, %141
-            exit_switch  # switch_1
-          }
-          $B10: {  # case
-            exit_switch  # switch_1
-          }
+        case 0:
+        {
+          float2 const x_136 = tileID;
+          float2 const x_140 = (*tint_module_vars.x_20).stageSize;
+          float4 const x_142 = tint_module_vars.tileMapsTexture0.sample(tint_module_vars.tileMapsSampler, ((x_136 + float2(0.5f)) / x_140), bias(0.0f));
+          frameID_1 = x_142[0u];
+          break;
         }
-        %142:f32 = load %frameID_1
-        %x_166:f32 = let %142
-        %144:ptr<uniform, f32, read> = access %x_20, 7u
-        %145:f32 = load %144
-        %x_169:f32 = let %145
-        %147:texture_2d<f32> = load %animationMapTexture
-        %148:texture_2d<f32> = let %147
-        %149:sampler = load %animationMapSampler
-        %150:sampler = let %149
-        %151:f32 = add %x_166, 0.5f
-        %152:f32 = div %151, %x_169
-        %153:vec2<f32> = construct %152, 0.0f
-        %154:vec4<f32> = textureSampleBias %148, %150, %153, 0.0f
-        %x_172:vec4<f32> = let %154
-        store %animationData, %x_172
-        %156:f32 = load_vector_element %animationData, 1u
-        %x_174:f32 = let %156
-        %158:bool = gt %x_174, 0.0f
-        if %158 [t: $B11] {  # if_2
-          $B11: {  # true
-            %159:ptr<uniform, f32, read> = access %x_20, 0u
-            %160:f32 = load %159
-            %x_181:f32 = let %160
-            %162:f32 = load_vector_element %animationData, 2u
-            %x_184:f32 = let %162
-            %164:f32 = mul %x_181, %x_184
-            %165:f32 = mod %164, 1.0f
-            store %mt, %165
-            store %f, 0.0f
-            loop [b: $B12, c: $B13] {  # loop_2
-              $B12: {  # body
-                %166:f32 = load %f
-                %x_193:f32 = let %166
-                %168:bool = lt %x_193, 8.0f
-                if %168 [t: $B14, f: $B15] {  # if_3
-                  $B14: {  # true
-                    exit_if  # if_3
-                  }
-                  $B15: {  # false
-                    exit_loop  # loop_2
-                  }
-                }
-                %169:f32 = load_vector_element %animationData, 1u
-                %x_197:f32 = let %169
-                %171:f32 = load %mt
-                %x_198:f32 = let %171
-                %173:bool = gt %x_197, %x_198
-                if %173 [t: $B16] {  # if_4
-                  $B16: {  # true
-                    %174:f32 = load_vector_element %animationData, 0u
-                    %x_203:f32 = let %174
-                    store %frameID_1, %x_203
-                    exit_loop  # loop_2
-                  }
-                }
-                %176:f32 = load %frameID_1
-                %x_208:f32 = let %176
-                %178:ptr<uniform, f32, read> = access %x_20, 7u
-                %179:f32 = load %178
-                %x_211:f32 = let %179
-                %181:f32 = load %f
-                %x_214:f32 = let %181
-                %x_217:vec4<f32> = let vec4<f32>(0.0f)
-                store %animationData, %x_217
-                continue  # -> $B13
-              }
-              $B13: {  # continuing
-                %184:f32 = load %f
-                %x_218:f32 = let %184
-                %186:f32 = add %x_218, 1.0f
-                store %f, %186
-                next_iteration  # -> $B12
-              }
+        default:
+        {
+          break;
+        }
+      }
+      float const x_166 = frameID_1;
+      float const x_169 = (*tint_module_vars.x_20).spriteCount;
+      float2 const v_5 = float2(((x_166 + 0.5f) / x_169), 0.0f);
+      float4 const x_172 = tint_module_vars.animationMapTexture.sample(tint_module_vars.animationMapSampler, v_5, bias(0.0f));
+      animationData = x_172;
+      float const x_174 = animationData[1u];
+      if ((x_174 > 0.0f)) {
+        float const x_181 = (*tint_module_vars.x_20).time;
+        float const x_184 = animationData[2u];
+        (*tint_module_vars.mt) = ((x_181 * x_184) % 1.0f);
+        f = 0.0f;
+        {
+          while(true) {
+            float const x_193 = f;
+            if ((x_193 < 8.0f)) {
+            } else {
+              break;
             }
-            exit_if  # if_2
+            float const x_197 = animationData[1u];
+            float const x_198 = (*tint_module_vars.mt);
+            if ((x_197 > x_198)) {
+              float const x_203 = animationData[0u];
+              frameID_1 = x_203;
+              break;
+            }
+            float const x_208 = frameID_1;
+            float const x_211 = (*tint_module_vars.x_20).spriteCount;
+            float const x_214 = f;
+            float4 const x_217 = float4(0.0f);
+            animationData = x_217;
+            {
+              float const x_218 = f;
+              f = (x_218 + 1.0f);
+            }
+            continue;
           }
         }
-        %187:f32 = load %frameID_1
-        %x_222:f32 = let %187
-        %189:f32 = add %x_222, 0.5f
-        store %param, %189
-        %190:mat4x4<f32> = call %getFrameData_f1_, %param
-        %x_225:mat4x4<f32> = let %190
-        store %frameData, %x_225
-        %192:ptr<function, vec4<f32>, read_write> = access %frameData, 0i
-        %193:vec4<f32> = load %192
-        %x_228:vec4<f32> = let %193
-        %195:ptr<uniform, vec2<f32>, read> = access %x_20, 5u
-        %196:vec2<f32> = load %195
-        %x_231:vec2<f32> = let %196
-        %198:f32 = access %x_228, 3u
-        %199:f32 = access %x_228, 2u
-        %200:vec2<f32> = construct %198, %199
-        %201:vec2<f32> = div %200, %x_231
-        store %frameSize, %201
-        %202:ptr<function, vec4<f32>, read_write> = access %frameData, 0i
-        %203:vec4<f32> = load %202
-        %x_235:vec4<f32> = let %203
-        %205:vec2<f32> = load %sheetUnits
-        %x_237:vec2<f32> = let %205
-        %207:f32 = access %x_235, 0u
-        %208:f32 = access %x_235, 1u
-        %209:vec2<f32> = construct %207, %208
-        %210:vec2<f32> = mul %209, %x_237
-        store %offset_1, %210
-        %211:ptr<function, vec4<f32>, read_write> = access %frameData, 2i
-        %212:vec4<f32> = load %211
-        %x_241:vec4<f32> = let %212
-        %214:ptr<function, vec4<f32>, read_write> = access %frameData, 0i
-        %215:vec4<f32> = load %214
-        %x_244:vec4<f32> = let %215
-        %217:f32 = access %x_241, 0u
-        %218:f32 = access %x_241, 1u
-        %219:vec2<f32> = construct %217, %218
-        %220:vec2<f32> = let %219
-        %221:f32 = access %x_244, 3u
-        %222:f32 = access %x_244, 2u
-        %223:vec2<f32> = construct %221, %222
-        %224:vec2<f32> = div %220, %223
-        store %ratio, %224
-        %225:ptr<function, vec4<f32>, read_write> = access %frameData, 2i
-        %226:f32 = load_vector_element %225, 2u
-        %x_248:f32 = let %226
-        %228:bool = eq %x_248, 1.0f
-        if %228 [t: $B17] {  # if_5
-          $B17: {  # true
-            %229:vec2<f32> = load %tileUV
-            %x_252:vec2<f32> = let %229
-            %231:f32 = access %x_252, 1u
-            %232:f32 = access %x_252, 0u
-            %233:vec2<f32> = construct %231, %232
-            store %tileUV, %233
-            exit_if  # if_5
-          }
-        }
-        %234:i32 = load %i
-        %x_254:i32 = let %234
-        %236:bool = eq %x_254, 0i
-        if %236 [t: $B18, f: $B19] {  # if_6
-          $B18: {  # true
-            %237:vec2<f32> = load %tileUV
-            %x_263:vec2<f32> = let %237
-            %239:vec2<f32> = load %frameSize
-            %x_264:vec2<f32> = let %239
-            %241:vec2<f32> = load %offset_1
-            %x_266:vec2<f32> = let %241
-            %243:texture_2d<f32> = load %spriteSheetTexture
-            %244:sampler = load %spriteSheetSampler
-            %245:vec2<f32> = mul %x_263, %x_264
-            %246:vec2<f32> = add %245, %x_266
-            %247:vec4<f32> = textureSample %243, %244, %246
-            %x_268:vec4<f32> = let %247
-            store %color, %x_268
-            exit_if  # if_6
-          }
-          $B19: {  # false
-            %249:vec2<f32> = load %tileUV
-            %x_274:vec2<f32> = let %249
-            %251:vec2<f32> = load %frameSize
-            %x_275:vec2<f32> = let %251
-            %253:vec2<f32> = load %offset_1
-            %x_277:vec2<f32> = let %253
-            %255:texture_2d<f32> = load %spriteSheetTexture
-            %256:sampler = load %spriteSheetSampler
-            %257:vec2<f32> = mul %x_274, %x_275
-            %258:vec2<f32> = add %257, %x_277
-            %259:vec4<f32> = textureSample %255, %256, %258
-            %x_279:vec4<f32> = let %259
-            store %nc, %x_279
-            %261:f32 = load_vector_element %color, 3u
-            %x_283:f32 = let %261
-            %263:f32 = load_vector_element %nc, 3u
-            %x_285:f32 = let %263
-            %265:f32 = add %x_283, %x_285
-            %266:f32 = min %265, 1.0f
-            store %alpha, %266
-            %267:vec4<f32> = load %color
-            %x_290:vec4<f32> = let %267
-            %269:vec4<f32> = load %nc
-            %x_292:vec4<f32> = let %269
-            %271:f32 = load_vector_element %nc, 3u
-            %x_295:f32 = let %271
-            %273:f32 = access %x_290, 0u
-            %274:f32 = access %x_290, 1u
-            %275:f32 = access %x_290, 2u
-            %276:vec3<f32> = construct %273, %274, %275
-            %277:vec3<f32> = let %276
-            %278:f32 = access %x_292, 0u
-            %279:f32 = access %x_292, 1u
-            %280:f32 = access %x_292, 2u
-            %281:vec3<f32> = construct %278, %279, %280
-            %282:vec3<f32> = let %281
-            %283:vec3<f32> = construct %x_295, %x_295, %x_295
-            %284:vec3<f32> = mix %277, %282, %283
-            store %mixed, %284
-            %285:vec3<f32> = load %mixed
-            %x_298:vec3<f32> = let %285
-            %287:f32 = load %alpha
-            %x_299:f32 = let %287
-            %289:f32 = access %x_298, 0u
-            %290:f32 = access %x_298, 1u
-            %291:f32 = access %x_298, 2u
-            %292:vec4<f32> = construct %289, %290, %291, %x_299
-            store %color, %292
-            exit_if  # if_6
-          }
-        }
-        continue  # -> $B5
       }
-      $B5: {  # continuing
-        %293:i32 = load %i
-        %x_304:i32 = let %293
-        %295:i32 = add %x_304, 1i
-        store %i, %295
-        next_iteration  # -> $B4
+      float const x_222 = frameID_1;
+      param = (x_222 + 0.5f);
+      float4x4 const x_225 = getFrameData_f1_((&param), tint_module_vars);
+      frameData = x_225;
+      float4 const x_228 = frameData[0];
+      float2 const x_231 = (*tint_module_vars.x_20).spriteMapSize;
+      frameSize = (float2(x_228[3u], x_228[2u]) / x_231);
+      float4 const x_235 = frameData[0];
+      float2 const x_237 = sheetUnits;
+      offset_1 = (float2(x_235[0u], x_235[1u]) * x_237);
+      float4 const x_241 = frameData[2];
+      float4 const x_244 = frameData[0];
+      float2 const v_6 = float2(x_241[0u], x_241[1u]);
+      ratio = (v_6 / float2(x_244[3u], x_244[2u]));
+      float const x_248 = frameData[2][2u];
+      if ((x_248 == 1.0f)) {
+        float2 const x_252 = tileUV;
+        tileUV = float2(x_252[1u], x_252[0u]);
       }
+      int const x_254 = i;
+      if ((x_254 == 0)) {
+        float2 const x_263 = tileUV;
+        float2 const x_264 = frameSize;
+        float2 const x_266 = offset_1;
+        float4 const x_268 = tint_module_vars.spriteSheetTexture.sample(tint_module_vars.spriteSheetSampler, ((x_263 * x_264) + x_266));
+        color = x_268;
+      } else {
+        float2 const x_274 = tileUV;
+        float2 const x_275 = frameSize;
+        float2 const x_277 = offset_1;
+        float4 const x_279 = tint_module_vars.spriteSheetTexture.sample(tint_module_vars.spriteSheetSampler, ((x_274 * x_275) + x_277));
+        nc = x_279;
+        float const x_283 = color[3u];
+        float const x_285 = nc[3u];
+        alpha = min((x_283 + x_285), 1.0f);
+        float4 const x_290 = color;
+        float4 const x_292 = nc;
+        float const x_295 = nc[3u];
+        float3 const v_7 = float3(x_290[0u], x_290[1u], x_290[2u]);
+        float3 const v_8 = float3(x_292[0u], x_292[1u], x_292[2u]);
+        mixed = mix(v_7, v_8, float3(x_295, x_295, x_295));
+        float3 const x_298 = mixed;
+        float const x_299 = alpha;
+        color = float4(x_298[0u], x_298[1u], x_298[2u], x_299);
+      }
+      {
+        int const x_304 = i;
+        i = (x_304 + 1);
+      }
+      continue;
     }
-    %296:ptr<uniform, vec3<f32>, read> = access %x_20, 8u
-    %297:vec3<f32> = load %296
-    %x_310:vec3<f32> = let %297
-    %299:vec4<f32> = load %color
-    %x_311:vec4<f32> = let %299
-    %301:f32 = access %x_311, 0u
-    %302:f32 = access %x_311, 1u
-    %303:f32 = access %x_311, 2u
-    %304:vec3<f32> = construct %301, %302, %303
-    %305:vec3<f32> = mul %304, %x_310
-    %x_313:vec3<f32> = let %305
-    %307:vec4<f32> = load %color
-    %x_314:vec4<f32> = let %307
-    %309:f32 = access %x_313, 0u
-    %310:f32 = access %x_313, 1u
-    %311:f32 = access %x_313, 2u
-    %312:f32 = access %x_314, 3u
-    %313:vec4<f32> = construct %309, %310, %311, %312
-    store %color, %313
-    %314:vec4<f32> = load %color
-    %x_318:vec4<f32> = let %314
-    store %glFragColor, %x_318
-    ret
   }
-}
-%tint_symbol = @fragment func(%tUV_param:vec2<f32> [@location(2)], %tileID_1_param:vec2<f32> [@location(5)], %levelUnits_param:vec2<f32> [@location(4)], %stageUnits_1_param:vec2<f32> [@location(3)], %vPosition_param:vec3<f32> [@location(0)], %vUV_param:vec2<f32> [@location(1)]):main_out {
-  $B20: {
-    store %tUV, %tUV_param
-    store %tileID_1, %tileID_1_param
-    store %levelUnits, %levelUnits_param
-    store %stageUnits_1, %stageUnits_1_param
-    store %vPosition, %vPosition_param
-    store %vUV, %vUV_param
-    %323:void = call %main_1
-    %324:vec4<f32> = load %glFragColor
-    %325:main_out = construct %324
-    ret %325
-  }
+  float3 const x_310 = (*tint_module_vars.x_20).colorMul;
+  float4 const x_311 = color;
+  float3 const x_313 = (float3(x_311[0u], x_311[1u], x_311[2u]) * x_310);
+  float4 const x_314 = color;
+  color = float4(x_313[0u], x_313[1u], x_313[2u], x_314[3u]);
+  float4 const x_318 = color;
+  (*tint_module_vars.glFragColor) = x_318;
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+main_out tint_symbol_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, tint_module_vars_struct tint_module_vars) {
+  (*tint_module_vars.tUV) = tUV_param;
+  (*tint_module_vars.tileID_1) = tileID_1_param;
+  (*tint_module_vars.levelUnits) = levelUnits_param;
+  (*tint_module_vars.stageUnits_1) = stageUnits_1_param;
+  (*tint_module_vars.vPosition) = vPosition_param;
+  (*tint_module_vars.vUV) = vUV_param;
+  main_1(tint_module_vars);
+  return main_out{.glFragColor_1=(*tint_module_vars.glFragColor)};
+}
+
+fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant LeftOver* x_20 [[buffer(0)]], texture2d<float, access::sample> frameMapTexture [[texture(3)]], sampler frameMapSampler [[sampler(2)]], texture2d<float, access::sample> tileMapsTexture0 [[texture(1)]], sampler tileMapsSampler [[sampler(0)]], texture2d<float, access::sample> tileMapsTexture1 [[texture(0)]], texture2d<float, access::sample> animationMapTexture [[texture(2)]], sampler animationMapSampler [[sampler(1)]], texture2d<float, access::sample> spriteSheetTexture [[texture(4)]], sampler spriteSheetSampler [[sampler(3)]]) {
+  thread float2 tUV = 0.0f;
+  thread float mt = 0.0f;
+  thread float4 glFragColor = 0.0f;
+  thread float2 tileID_1 = 0.0f;
+  thread float2 levelUnits = 0.0f;
+  thread float2 stageUnits_1 = 0.0f;
+  thread float3 vPosition = 0.0f;
+  thread float2 vUV = 0.0f;
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_20=x_20, .frameMapTexture=frameMapTexture, .frameMapSampler=frameMapSampler, .tUV=(&tUV), .tileMapsTexture0=tileMapsTexture0, .tileMapsSampler=tileMapsSampler, .tileMapsTexture1=tileMapsTexture1, .animationMapTexture=animationMapTexture, .animationMapSampler=animationMapSampler, .mt=(&mt), .spriteSheetTexture=spriteSheetTexture, .spriteSheetSampler=spriteSheetSampler, .glFragColor=(&glFragColor), .tileID_1=(&tileID_1), .levelUnits=(&levelUnits), .stageUnits_1=(&stageUnits_1), .vPosition=(&vPosition), .vUV=(&vUV)};
+  return tint_symbol_outputs{.main_out_glFragColor_1=tint_symbol_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param, tint_module_vars).glFragColor_1};
+}
+program_source:145:51: error: invalid operands to binary expression ('float' and 'float')
+        (*tint_module_vars.mt) = ((x_181 * x_184) % 1.0f);
+                                  ~~~~~~~~~~~~~~~ ^ ~~~~
+program_source:161:25: warning: unused variable 'x_208' [-Wunused-variable]
+            float const x_208 = frameID_1;
+                        ^
+program_source:162:25: warning: unused variable 'x_211' [-Wunused-variable]
+            float const x_211 = (*tint_module_vars.x_20).spriteCount;
+                        ^
+program_source:163:25: warning: unused variable 'x_214' [-Wunused-variable]
+            float const x_214 = f;
+                        ^
+
diff --git a/test/tint/bug/tint/949.wgsl.expected.ir.msl b/test/tint/bug/tint/949.wgsl.expected.ir.msl
index 7148115..9c6169c 100644
--- a/test/tint/bug/tint/949.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/949.wgsl.expected.ir.msl
@@ -1,845 +1,485 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: LeftOver = struct @align(16) {
-  u_World:mat4x4<f32> @offset(0)
-  u_ViewProjection:mat4x4<f32> @offset(64)
-  u_bumpStrength:f32 @offset(128)
-  padding:u32 @offset(132)
-  u_cameraPosition:vec3<f32> @offset(144)
-  u_parallaxScale:f32 @offset(156)
-  textureInfoName:f32 @offset(160)
-  padding_1:u32 @offset(164)
-  tangentSpaceParameter0:vec2<f32> @offset(168)
+#include <metal_stdlib>
+using namespace metal;
+
+struct lightingInfo {
+  float3 diffuse;
+  float3 specular;
+};
+
+struct LeftOver {
+  float4x4 u_World;
+  float4x4 u_ViewProjection;
+  float u_bumpStrength;
+  uint padding;
+  float3 u_cameraPosition;
+  float u_parallaxScale;
+  float textureInfoName;
+  uint padding_1;
+  float2 tangentSpaceParameter0;
+};
+
+struct Light0 {
+  float4 vLightData;
+  float4 vLightDiffuse;
+  float4 vLightSpecular;
+  float3 vLightGround;
+  uint padding_2;
+  float4 shadowsInfo;
+  float2 depthValues;
+};
+
+struct tint_module_vars_struct {
+  thread float* u_Float;
+  thread float3* u_Color;
+  texture2d<float, access::sample> TextureSamplerTexture;
+  sampler TextureSamplerSampler;
+  thread float2* vMainuv;
+  const constant LeftOver* x_269;
+  thread float4* v_output1;
+  thread bool* gl_FrontFacing;
+  thread float2* v_uv;
+  thread float4* v_output2;
+  texture2d<float, access::sample> TextureSampler1Texture;
+  sampler TextureSampler1Sampler;
+  const constant Light0* light0;
+  thread float4* glFragColor;
+  sampler bumpSamplerSampler;
+  texture2d<float, access::sample> bumpSamplerTexture;
+};
+
+struct main_out {
+  float4 glFragColor_1;
+};
+
+struct tint_symbol_outputs {
+  float4 main_out_glFragColor_1 [[color(0)]];
+};
+
+struct tint_symbol_inputs {
+  float2 vMainuv_param [[user(locn1)]];
+  float4 v_output1_param [[user(locn0)]];
+  float2 v_uv_param [[user(locn3)]];
+  float4 v_output2_param [[user(locn2)]];
+};
+
+float3x3 cotangent_frame_vf3_vf3_vf2_vf2_(thread float3* const normal_1, thread float3* const p, thread float2* const uv, thread float2* const tangentSpaceParams) {
+  float3 dp1 = 0.0f;
+  float3 dp2 = 0.0f;
+  float2 duv1 = 0.0f;
+  float2 duv2 = 0.0f;
+  float3 dp2perp = 0.0f;
+  float3 dp1perp = 0.0f;
+  float3 tangent = 0.0f;
+  float3 bitangent = 0.0f;
+  float invmax = 0.0f;
+  float3 const x_133 = (*p);
+  dp1 = dfdx(x_133);
+  float3 const x_136 = (*p);
+  dp2 = dfdy(x_136);
+  float2 const x_139 = (*uv);
+  duv1 = dfdx(x_139);
+  float2 const x_142 = (*uv);
+  duv2 = dfdy(x_142);
+  float3 const x_145 = dp2;
+  float3 const x_146 = (*normal_1);
+  dp2perp = cross(x_145, x_146);
+  float3 const x_149 = (*normal_1);
+  float3 const x_150 = dp1;
+  dp1perp = cross(x_149, x_150);
+  float3 const x_153 = dp2perp;
+  float const x_155 = duv1[0u];
+  float3 const x_157 = dp1perp;
+  float const x_159 = duv2[0u];
+  tangent = ((x_153 * x_155) + (x_157 * x_159));
+  float3 const x_163 = dp2perp;
+  float const x_165 = duv1[1u];
+  float3 const x_167 = dp1perp;
+  float const x_169 = duv2[1u];
+  bitangent = ((x_163 * x_165) + (x_167 * x_169));
+  float const x_173 = (*tangentSpaceParams)[0u];
+  float3 const x_174 = tangent;
+  tangent = (x_174 * x_173);
+  float const x_177 = (*tangentSpaceParams)[1u];
+  float3 const x_178 = bitangent;
+  bitangent = (x_178 * x_177);
+  float3 const x_181 = tangent;
+  float3 const x_182 = tangent;
+  float3 const x_184 = bitangent;
+  float3 const x_185 = bitangent;
+  float const v = dot(x_181, x_182);
+  invmax = rsqrt(max(v, dot(x_184, x_185)));
+  float3 const x_189 = tangent;
+  float const x_190 = invmax;
+  float3 const x_191 = (x_189 * x_190);
+  float3 const x_192 = bitangent;
+  float const x_193 = invmax;
+  float3 const x_194 = (x_192 * x_193);
+  float3 const x_195 = (*normal_1);
+  float3 const v_1 = float3(x_191[0u], x_191[1u], x_191[2u]);
+  float3 const v_2 = float3(x_194[0u], x_194[1u], x_194[2u]);
+  return float3x3(v_1, v_2, float3(x_195[0u], x_195[1u], x_195[2u]));
 }
 
-Light0 = struct @align(16) {
-  vLightData:vec4<f32> @offset(0)
-  vLightDiffuse:vec4<f32> @offset(16)
-  vLightSpecular:vec4<f32> @offset(32)
-  vLightGround:vec3<f32> @offset(48)
-  padding_2:u32 @offset(60)
-  shadowsInfo:vec4<f32> @offset(64)
-  depthValues:vec2<f32> @offset(80)
+float3x3 transposeMat3_mf33_(thread float3x3* const inMatrix) {
+  float3 i0 = 0.0f;
+  float3 i1 = 0.0f;
+  float3 i2 = 0.0f;
+  float3x3 outMatrix = float3x3(0.0f);
+  float3 const x_60 = (*inMatrix)[0];
+  i0 = x_60;
+  float3 const x_64 = (*inMatrix)[1];
+  i1 = x_64;
+  float3 const x_68 = (*inMatrix)[2];
+  i2 = x_68;
+  float const x_73 = i0[0u];
+  float const x_75 = i1[0u];
+  float const x_77 = i2[0u];
+  float3 const x_78 = float3(x_73, x_75, x_77);
+  float const x_81 = i0[1u];
+  float const x_83 = i1[1u];
+  float const x_85 = i2[1u];
+  float3 const x_86 = float3(x_81, x_83, x_85);
+  float const x_89 = i0[2u];
+  float const x_91 = i1[2u];
+  float const x_93 = i2[2u];
+  float3 const x_94 = float3(x_89, x_91, x_93);
+  float3 const v_3 = float3(x_78[0u], x_78[1u], x_78[2u]);
+  float3 const v_4 = float3(x_86[0u], x_86[1u], x_86[2u]);
+  outMatrix = float3x3(v_3, v_4, float3(x_94[0u], x_94[1u], x_94[2u]));
+  float3x3 const x_110 = outMatrix;
+  return x_110;
 }
 
-lightingInfo = struct @align(16) {
-  diffuse:vec3<f32> @offset(0)
-  specular:vec3<f32> @offset(16)
+float3 perturbNormalBase_mf33_vf3_f1_(thread float3x3* const cotangentFrame, thread float3* const normal, thread float* const scale) {
+  float3x3 const x_113 = (*cotangentFrame);
+  float3 const x_114 = (*normal);
+  return normalize((x_113 * x_114));
 }
 
-main_out = struct @align(16) {
-  glFragColor_1:vec4<f32> @offset(0), @location(0)
+float3 perturbNormal_mf33_vf3_f1_(thread float3x3* const cotangentFrame_1, thread float3* const textureSample, thread float* const scale_1) {
+  float3x3 param = float3x3(0.0f);
+  float3 param_1 = 0.0f;
+  float param_2 = 0.0f;
+  float3 const x_119 = (*textureSample);
+  float3x3 const x_125 = (*cotangentFrame_1);
+  param = x_125;
+  param_1 = ((x_119 * 2.0f) - float3(1.0f));
+  float const x_128 = (*scale_1);
+  param_2 = x_128;
+  float3 const x_129 = perturbNormalBase_mf33_vf3_f1_((&param), (&param_1), (&param_2));
+  return x_129;
 }
 
-$B1: {  # root
-  %u_Float:ptr<private, f32, read_write> = var
-  %u_Color:ptr<private, vec3<f32>, read_write> = var
-  %TextureSamplerTexture:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 1)
-  %TextureSamplerSampler:ptr<handle, sampler, read> = var @binding_point(2, 0)
-  %vMainuv:ptr<private, vec2<f32>, read_write> = var
-  %x_269:ptr<uniform, LeftOver, read> = var @binding_point(2, 6)
-  %v_output1:ptr<private, vec4<f32>, read_write> = var
-  %gl_FrontFacing:ptr<private, bool, read_write> = var
-  %v_uv:ptr<private, vec2<f32>, read_write> = var
-  %v_output2:ptr<private, vec4<f32>, read_write> = var
-  %TextureSampler1Texture:ptr<handle, texture_2d<f32>, read> = var @binding_point(2, 3)
-  %TextureSampler1Sampler:ptr<handle, sampler, read> = var @binding_point(2, 2)
-  %light0:ptr<uniform, Light0, read> = var @binding_point(0, 5)
-  %glFragColor:ptr<private, vec4<f32>, read_write> = var
-  %bumpSamplerSampler:ptr<handle, sampler, read> = var @binding_point(0, 4)
-  %bumpSamplerTexture:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 5)
+lightingInfo computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_(thread float3* const viewDirectionW, thread float3* const vNormal, thread float4* const lightData, thread float3* const diffuseColor, thread float3* const specularColor, thread float3* const groundColor, thread float* const glossiness) {
+  float ndl = 0.0f;
+  lightingInfo result = {};
+  float3 angleW = 0.0f;
+  float specComp = 0.0f;
+  float3 const x_212 = (*vNormal);
+  float4 const x_213 = (*lightData);
+  ndl = ((dot(x_212, float3(x_213[0u], x_213[1u], x_213[2u])) * 0.5f) + 0.5f);
+  float3 const x_220 = (*groundColor);
+  float3 const x_221 = (*diffuseColor);
+  float const x_222 = ndl;
+  result.diffuse = mix(x_220, x_221, float3(x_222, x_222, x_222));
+  float3 const x_227 = (*viewDirectionW);
+  float4 const x_228 = (*lightData);
+  angleW = normalize((x_227 + float3(x_228[0u], x_228[1u], x_228[2u])));
+  float3 const x_233 = (*vNormal);
+  float3 const x_234 = angleW;
+  specComp = max(0.0f, dot(x_233, x_234));
+  float const x_237 = specComp;
+  float const x_238 = (*glossiness);
+  specComp = powr(x_237, max(1.0f, x_238));
+  float const x_241 = specComp;
+  float3 const x_242 = (*specularColor);
+  result.specular = (x_242 * x_241);
+  lightingInfo const x_245 = result;
+  return x_245;
 }
 
-%cotangent_frame_vf3_vf3_vf2_vf2_ = func(%normal_1:ptr<function, vec3<f32>, read_write>, %p:ptr<function, vec3<f32>, read_write>, %uv:ptr<function, vec2<f32>, read_write>, %tangentSpaceParams:ptr<function, vec2<f32>, read_write>):mat3x3<f32> {
-  $B2: {
-    %dp1:ptr<function, vec3<f32>, read_write> = var
-    %dp2:ptr<function, vec3<f32>, read_write> = var
-    %duv1:ptr<function, vec2<f32>, read_write> = var
-    %duv2:ptr<function, vec2<f32>, read_write> = var
-    %dp2perp:ptr<function, vec3<f32>, read_write> = var
-    %dp1perp:ptr<function, vec3<f32>, read_write> = var
-    %tangent:ptr<function, vec3<f32>, read_write> = var
-    %bitangent:ptr<function, vec3<f32>, read_write> = var
-    %invmax:ptr<function, f32, read_write> = var
-    %31:vec3<f32> = load %p
-    %x_133:vec3<f32> = let %31
-    %33:vec3<f32> = dpdx %x_133
-    store %dp1, %33
-    %34:vec3<f32> = load %p
-    %x_136:vec3<f32> = let %34
-    %36:vec3<f32> = dpdy %x_136
-    store %dp2, %36
-    %37:vec2<f32> = load %uv
-    %x_139:vec2<f32> = let %37
-    %39:vec2<f32> = dpdx %x_139
-    store %duv1, %39
-    %40:vec2<f32> = load %uv
-    %x_142:vec2<f32> = let %40
-    %42:vec2<f32> = dpdy %x_142
-    store %duv2, %42
-    %43:vec3<f32> = load %dp2
-    %x_145:vec3<f32> = let %43
-    %45:vec3<f32> = load %normal_1
-    %x_146:vec3<f32> = let %45
-    %47:vec3<f32> = cross %x_145, %x_146
-    store %dp2perp, %47
-    %48:vec3<f32> = load %normal_1
-    %x_149:vec3<f32> = let %48
-    %50:vec3<f32> = load %dp1
-    %x_150:vec3<f32> = let %50
-    %52:vec3<f32> = cross %x_149, %x_150
-    store %dp1perp, %52
-    %53:vec3<f32> = load %dp2perp
-    %x_153:vec3<f32> = let %53
-    %55:f32 = load_vector_element %duv1, 0u
-    %x_155:f32 = let %55
-    %57:vec3<f32> = load %dp1perp
-    %x_157:vec3<f32> = let %57
-    %59:f32 = load_vector_element %duv2, 0u
-    %x_159:f32 = let %59
-    %61:vec3<f32> = mul %x_153, %x_155
-    %62:vec3<f32> = mul %x_157, %x_159
-    %63:vec3<f32> = add %61, %62
-    store %tangent, %63
-    %64:vec3<f32> = load %dp2perp
-    %x_163:vec3<f32> = let %64
-    %66:f32 = load_vector_element %duv1, 1u
-    %x_165:f32 = let %66
-    %68:vec3<f32> = load %dp1perp
-    %x_167:vec3<f32> = let %68
-    %70:f32 = load_vector_element %duv2, 1u
-    %x_169:f32 = let %70
-    %72:vec3<f32> = mul %x_163, %x_165
-    %73:vec3<f32> = mul %x_167, %x_169
-    %74:vec3<f32> = add %72, %73
-    store %bitangent, %74
-    %75:f32 = load_vector_element %tangentSpaceParams, 0u
-    %x_173:f32 = let %75
-    %77:vec3<f32> = load %tangent
-    %x_174:vec3<f32> = let %77
-    %79:vec3<f32> = mul %x_174, %x_173
-    store %tangent, %79
-    %80:f32 = load_vector_element %tangentSpaceParams, 1u
-    %x_177:f32 = let %80
-    %82:vec3<f32> = load %bitangent
-    %x_178:vec3<f32> = let %82
-    %84:vec3<f32> = mul %x_178, %x_177
-    store %bitangent, %84
-    %85:vec3<f32> = load %tangent
-    %x_181:vec3<f32> = let %85
-    %87:vec3<f32> = load %tangent
-    %x_182:vec3<f32> = let %87
-    %89:vec3<f32> = load %bitangent
-    %x_184:vec3<f32> = let %89
-    %91:vec3<f32> = load %bitangent
-    %x_185:vec3<f32> = let %91
-    %93:f32 = dot %x_181, %x_182
-    %94:f32 = let %93
-    %95:f32 = dot %x_184, %x_185
-    %96:f32 = max %94, %95
-    %97:f32 = inverseSqrt %96
-    store %invmax, %97
-    %98:vec3<f32> = load %tangent
-    %x_189:vec3<f32> = let %98
-    %100:f32 = load %invmax
-    %x_190:f32 = let %100
-    %102:vec3<f32> = mul %x_189, %x_190
-    %x_191:vec3<f32> = let %102
-    %104:vec3<f32> = load %bitangent
-    %x_192:vec3<f32> = let %104
-    %106:f32 = load %invmax
-    %x_193:f32 = let %106
-    %108:vec3<f32> = mul %x_192, %x_193
-    %x_194:vec3<f32> = let %108
-    %110:vec3<f32> = load %normal_1
-    %x_195:vec3<f32> = let %110
-    %112:f32 = access %x_191, 0u
-    %113:f32 = access %x_191, 1u
-    %114:f32 = access %x_191, 2u
-    %115:vec3<f32> = construct %112, %113, %114
-    %116:vec3<f32> = let %115
-    %117:f32 = access %x_194, 0u
-    %118:f32 = access %x_194, 1u
-    %119:f32 = access %x_194, 2u
-    %120:vec3<f32> = construct %117, %118, %119
-    %121:vec3<f32> = let %120
-    %122:f32 = access %x_195, 0u
-    %123:f32 = access %x_195, 1u
-    %124:f32 = access %x_195, 2u
-    %125:vec3<f32> = construct %122, %123, %124
-    %126:mat3x3<f32> = construct %116, %121, %125
-    ret %126
+void main_1(tint_module_vars_struct tint_module_vars) {
+  float4 tempTextureRead = 0.0f;
+  float3 rgb = 0.0f;
+  float3 output5 = 0.0f;
+  float4 output4 = 0.0f;
+  float2 uvOffset = 0.0f;
+  float normalScale = 0.0f;
+  float2 TBNUV = 0.0f;
+  float2 x_299 = 0.0f;
+  float3x3 TBN = float3x3(0.0f);
+  float3 param_3 = 0.0f;
+  float3 param_4 = 0.0f;
+  float2 param_5 = 0.0f;
+  float2 param_6 = 0.0f;
+  float3x3 invTBN = float3x3(0.0f);
+  float3x3 param_7 = float3x3(0.0f);
+  float parallaxLimit = 0.0f;
+  float2 vOffsetDir = 0.0f;
+  float2 vMaxOffset = 0.0f;
+  float numSamples = 0.0f;
+  float stepSize = 0.0f;
+  float currRayHeight = 0.0f;
+  float2 vCurrOffset = 0.0f;
+  float2 vLastOffset = 0.0f;
+  float lastSampledHeight = 0.0f;
+  float currSampledHeight = 0.0f;
+  int i = 0;
+  float delta1 = 0.0f;
+  float delta2 = 0.0f;
+  float ratio = 0.0f;
+  float2 parallaxOcclusion_0 = 0.0f;
+  float3x3 param_8 = float3x3(0.0f);
+  float3 param_9 = 0.0f;
+  float param_10 = 0.0f;
+  float2 output6 = 0.0f;
+  float4 tempTextureRead1 = 0.0f;
+  float3 rgb1 = 0.0f;
+  float3 viewDirectionW_1 = 0.0f;
+  float shadow = 0.0f;
+  float glossiness_1 = 0.0f;
+  float3 diffuseBase = 0.0f;
+  float3 specularBase = 0.0f;
+  float3 normalW = 0.0f;
+  lightingInfo info = {};
+  float3 param_11 = 0.0f;
+  float3 param_12 = 0.0f;
+  float4 param_13 = 0.0f;
+  float3 param_14 = 0.0f;
+  float3 param_15 = 0.0f;
+  float3 param_16 = 0.0f;
+  float param_17 = 0.0f;
+  float3 diffuseOutput = 0.0f;
+  float3 specularOutput = 0.0f;
+  float3 output3 = 0.0f;
+  (*tint_module_vars.u_Float) = 100.0f;
+  (*tint_module_vars.u_Color) = float3(0.5f);
+  float2 const x_261 = (*tint_module_vars.vMainuv);
+  float4 const x_262 = tint_module_vars.TextureSamplerTexture.sample(tint_module_vars.TextureSamplerSampler, x_261);
+  tempTextureRead = x_262;
+  float4 const x_264 = tempTextureRead;
+  float const x_273 = (*tint_module_vars.x_269).textureInfoName;
+  rgb = (float3(x_264[0u], x_264[1u], x_264[2u]) * x_273);
+  float3 const x_279 = (*tint_module_vars.x_269).u_cameraPosition;
+  float4 const x_282 = (*tint_module_vars.v_output1);
+  output5 = normalize((x_279 - float3(x_282[0u], x_282[1u], x_282[2u])));
+  output4 = float4(0.0f);
+  uvOffset = float2(0.0f);
+  float const x_292 = (*tint_module_vars.x_269).u_bumpStrength;
+  normalScale = (1.0f / x_292);
+  bool const x_298 = (*tint_module_vars.gl_FrontFacing);
+  if (x_298) {
+    float2 const x_303 = (*tint_module_vars.v_uv);
+    x_299 = x_303;
+  } else {
+    float2 const x_305 = (*tint_module_vars.v_uv);
+    x_299 = -(x_305);
   }
-}
-%transposeMat3_mf33_ = func(%inMatrix:ptr<function, mat3x3<f32>, read_write>):mat3x3<f32> {
-  $B3: {
-    %i0:ptr<function, vec3<f32>, read_write> = var
-    %i1:ptr<function, vec3<f32>, read_write> = var
-    %i2:ptr<function, vec3<f32>, read_write> = var
-    %outMatrix:ptr<function, mat3x3<f32>, read_write> = var
-    %133:ptr<function, vec3<f32>, read_write> = access %inMatrix, 0i
-    %134:vec3<f32> = load %133
-    %x_60:vec3<f32> = let %134
-    store %i0, %x_60
-    %136:ptr<function, vec3<f32>, read_write> = access %inMatrix, 1i
-    %137:vec3<f32> = load %136
-    %x_64:vec3<f32> = let %137
-    store %i1, %x_64
-    %139:ptr<function, vec3<f32>, read_write> = access %inMatrix, 2i
-    %140:vec3<f32> = load %139
-    %x_68:vec3<f32> = let %140
-    store %i2, %x_68
-    %142:f32 = load_vector_element %i0, 0u
-    %x_73:f32 = let %142
-    %144:f32 = load_vector_element %i1, 0u
-    %x_75:f32 = let %144
-    %146:f32 = load_vector_element %i2, 0u
-    %x_77:f32 = let %146
-    %148:vec3<f32> = construct %x_73, %x_75, %x_77
-    %x_78:vec3<f32> = let %148
-    %150:f32 = load_vector_element %i0, 1u
-    %x_81:f32 = let %150
-    %152:f32 = load_vector_element %i1, 1u
-    %x_83:f32 = let %152
-    %154:f32 = load_vector_element %i2, 1u
-    %x_85:f32 = let %154
-    %156:vec3<f32> = construct %x_81, %x_83, %x_85
-    %x_86:vec3<f32> = let %156
-    %158:f32 = load_vector_element %i0, 2u
-    %x_89:f32 = let %158
-    %160:f32 = load_vector_element %i1, 2u
-    %x_91:f32 = let %160
-    %162:f32 = load_vector_element %i2, 2u
-    %x_93:f32 = let %162
-    %164:vec3<f32> = construct %x_89, %x_91, %x_93
-    %x_94:vec3<f32> = let %164
-    %166:f32 = access %x_78, 0u
-    %167:f32 = access %x_78, 1u
-    %168:f32 = access %x_78, 2u
-    %169:vec3<f32> = construct %166, %167, %168
-    %170:vec3<f32> = let %169
-    %171:f32 = access %x_86, 0u
-    %172:f32 = access %x_86, 1u
-    %173:f32 = access %x_86, 2u
-    %174:vec3<f32> = construct %171, %172, %173
-    %175:vec3<f32> = let %174
-    %176:f32 = access %x_94, 0u
-    %177:f32 = access %x_94, 1u
-    %178:f32 = access %x_94, 2u
-    %179:vec3<f32> = construct %176, %177, %178
-    %180:mat3x3<f32> = construct %170, %175, %179
-    store %outMatrix, %180
-    %181:mat3x3<f32> = load %outMatrix
-    %x_110:mat3x3<f32> = let %181
-    ret %x_110
-  }
-}
-%perturbNormalBase_mf33_vf3_f1_ = func(%cotangentFrame:ptr<function, mat3x3<f32>, read_write>, %normal:ptr<function, vec3<f32>, read_write>, %scale:ptr<function, f32, read_write>):vec3<f32> {
-  $B4: {
-    %187:mat3x3<f32> = load %cotangentFrame
-    %x_113:mat3x3<f32> = let %187
-    %189:vec3<f32> = load %normal
-    %x_114:vec3<f32> = let %189
-    %191:vec3<f32> = mul %x_113, %x_114
-    %192:vec3<f32> = normalize %191
-    ret %192
-  }
-}
-%perturbNormal_mf33_vf3_f1_ = func(%cotangentFrame_1:ptr<function, mat3x3<f32>, read_write>, %textureSample:ptr<function, vec3<f32>, read_write>, %scale_1:ptr<function, f32, read_write>):vec3<f32> {
-  $B5: {
-    %param:ptr<function, mat3x3<f32>, read_write> = var
-    %param_1:ptr<function, vec3<f32>, read_write> = var
-    %param_2:ptr<function, f32, read_write> = var
-    %200:vec3<f32> = load %textureSample
-    %x_119:vec3<f32> = let %200
-    %202:mat3x3<f32> = load %cotangentFrame_1
-    %x_125:mat3x3<f32> = let %202
-    store %param, %x_125
-    %204:vec3<f32> = mul %x_119, 2.0f
-    %205:vec3<f32> = sub %204, vec3<f32>(1.0f)
-    store %param_1, %205
-    %206:f32 = load %scale_1
-    %x_128:f32 = let %206
-    store %param_2, %x_128
-    %208:vec3<f32> = call %perturbNormalBase_mf33_vf3_f1_, %param, %param_1, %param_2
-    %x_129:vec3<f32> = let %208
-    ret %x_129
-  }
-}
-%computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_ = func(%viewDirectionW:ptr<function, vec3<f32>, read_write>, %vNormal:ptr<function, vec3<f32>, read_write>, %lightData:ptr<function, vec4<f32>, read_write>, %diffuseColor:ptr<function, vec3<f32>, read_write>, %specularColor:ptr<function, vec3<f32>, read_write>, %groundColor:ptr<function, vec3<f32>, read_write>, %glossiness:ptr<function, f32, read_write>):lightingInfo {
-  $B6: {
-    %ndl:ptr<function, f32, read_write> = var
-    %result:ptr<function, lightingInfo, read_write> = var
-    %angleW:ptr<function, vec3<f32>, read_write> = var
-    %specComp:ptr<function, f32, read_write> = var
-    %222:vec3<f32> = load %vNormal
-    %x_212:vec3<f32> = let %222
-    %224:vec4<f32> = load %lightData
-    %x_213:vec4<f32> = let %224
-    %226:f32 = access %x_213, 0u
-    %227:f32 = access %x_213, 1u
-    %228:f32 = access %x_213, 2u
-    %229:vec3<f32> = construct %226, %227, %228
-    %230:f32 = dot %x_212, %229
-    %231:f32 = mul %230, 0.5f
-    %232:f32 = add %231, 0.5f
-    store %ndl, %232
-    %233:vec3<f32> = load %groundColor
-    %x_220:vec3<f32> = let %233
-    %235:vec3<f32> = load %diffuseColor
-    %x_221:vec3<f32> = let %235
-    %237:f32 = load %ndl
-    %x_222:f32 = let %237
-    %239:ptr<function, vec3<f32>, read_write> = access %result, 0u
-    %240:vec3<f32> = construct %x_222, %x_222, %x_222
-    %241:vec3<f32> = mix %x_220, %x_221, %240
-    store %239, %241
-    %242:vec3<f32> = load %viewDirectionW
-    %x_227:vec3<f32> = let %242
-    %244:vec4<f32> = load %lightData
-    %x_228:vec4<f32> = let %244
-    %246:f32 = access %x_228, 0u
-    %247:f32 = access %x_228, 1u
-    %248:f32 = access %x_228, 2u
-    %249:vec3<f32> = construct %246, %247, %248
-    %250:vec3<f32> = add %x_227, %249
-    %251:vec3<f32> = normalize %250
-    store %angleW, %251
-    %252:vec3<f32> = load %vNormal
-    %x_233:vec3<f32> = let %252
-    %254:vec3<f32> = load %angleW
-    %x_234:vec3<f32> = let %254
-    %256:f32 = dot %x_233, %x_234
-    %257:f32 = max 0.0f, %256
-    store %specComp, %257
-    %258:f32 = load %specComp
-    %x_237:f32 = let %258
-    %260:f32 = load %glossiness
-    %x_238:f32 = let %260
-    %262:f32 = max 1.0f, %x_238
-    %263:f32 = pow %x_237, %262
-    store %specComp, %263
-    %264:f32 = load %specComp
-    %x_241:f32 = let %264
-    %266:vec3<f32> = load %specularColor
-    %x_242:vec3<f32> = let %266
-    %268:ptr<function, vec3<f32>, read_write> = access %result, 1u
-    %269:vec3<f32> = mul %x_242, %x_241
-    store %268, %269
-    %270:lightingInfo = load %result
-    %x_245:lightingInfo = let %270
-    ret %x_245
-  }
-}
-%main_1 = func():void {
-  $B7: {
-    %tempTextureRead:ptr<function, vec4<f32>, read_write> = var
-    %rgb:ptr<function, vec3<f32>, read_write> = var
-    %output5:ptr<function, vec3<f32>, read_write> = var
-    %output4:ptr<function, vec4<f32>, read_write> = var
-    %uvOffset:ptr<function, vec2<f32>, read_write> = var
-    %normalScale:ptr<function, f32, read_write> = var
-    %TBNUV:ptr<function, vec2<f32>, read_write> = var
-    %x_299:ptr<function, vec2<f32>, read_write> = var
-    %TBN:ptr<function, mat3x3<f32>, read_write> = var
-    %param_3:ptr<function, vec3<f32>, read_write> = var
-    %param_4:ptr<function, vec3<f32>, read_write> = var
-    %param_5:ptr<function, vec2<f32>, read_write> = var
-    %param_6:ptr<function, vec2<f32>, read_write> = var
-    %invTBN:ptr<function, mat3x3<f32>, read_write> = var
-    %param_7:ptr<function, mat3x3<f32>, read_write> = var
-    %parallaxLimit:ptr<function, f32, read_write> = var
-    %vOffsetDir:ptr<function, vec2<f32>, read_write> = var
-    %vMaxOffset:ptr<function, vec2<f32>, read_write> = var
-    %numSamples:ptr<function, f32, read_write> = var
-    %stepSize:ptr<function, f32, read_write> = var
-    %currRayHeight:ptr<function, f32, read_write> = var
-    %vCurrOffset:ptr<function, vec2<f32>, read_write> = var
-    %vLastOffset:ptr<function, vec2<f32>, read_write> = var
-    %lastSampledHeight:ptr<function, f32, read_write> = var
-    %currSampledHeight:ptr<function, f32, read_write> = var
-    %i:ptr<function, i32, read_write> = var
-    %delta1:ptr<function, f32, read_write> = var
-    %delta2:ptr<function, f32, read_write> = var
-    %ratio:ptr<function, f32, read_write> = var
-    %parallaxOcclusion_0:ptr<function, vec2<f32>, read_write> = var
-    %param_8:ptr<function, mat3x3<f32>, read_write> = var
-    %param_9:ptr<function, vec3<f32>, read_write> = var
-    %param_10:ptr<function, f32, read_write> = var
-    %output6:ptr<function, vec2<f32>, read_write> = var
-    %tempTextureRead1:ptr<function, vec4<f32>, read_write> = var
-    %rgb1:ptr<function, vec3<f32>, read_write> = var
-    %viewDirectionW_1:ptr<function, vec3<f32>, read_write> = var
-    %shadow:ptr<function, f32, read_write> = var
-    %glossiness_1:ptr<function, f32, read_write> = var
-    %diffuseBase:ptr<function, vec3<f32>, read_write> = var
-    %specularBase:ptr<function, vec3<f32>, read_write> = var
-    %normalW:ptr<function, vec3<f32>, read_write> = var
-    %info:ptr<function, lightingInfo, read_write> = var
-    %param_11:ptr<function, vec3<f32>, read_write> = var
-    %param_12:ptr<function, vec3<f32>, read_write> = var
-    %param_13:ptr<function, vec4<f32>, read_write> = var
-    %param_14:ptr<function, vec3<f32>, read_write> = var
-    %param_15:ptr<function, vec3<f32>, read_write> = var
-    %param_16:ptr<function, vec3<f32>, read_write> = var
-    %param_17:ptr<function, f32, read_write> = var
-    %diffuseOutput:ptr<function, vec3<f32>, read_write> = var
-    %specularOutput:ptr<function, vec3<f32>, read_write> = var
-    %output3:ptr<function, vec3<f32>, read_write> = var
-    store %u_Float, 100.0f
-    store %u_Color, vec3<f32>(0.5f)
-    %326:vec2<f32> = load %vMainuv
-    %x_261:vec2<f32> = let %326
-    %328:texture_2d<f32> = load %TextureSamplerTexture
-    %329:sampler = load %TextureSamplerSampler
-    %330:vec4<f32> = textureSample %328, %329, %x_261
-    %x_262:vec4<f32> = let %330
-    store %tempTextureRead, %x_262
-    %332:vec4<f32> = load %tempTextureRead
-    %x_264:vec4<f32> = let %332
-    %334:ptr<uniform, f32, read> = access %x_269, 6u
-    %335:f32 = load %334
-    %x_273:f32 = let %335
-    %337:f32 = access %x_264, 0u
-    %338:f32 = access %x_264, 1u
-    %339:f32 = access %x_264, 2u
-    %340:vec3<f32> = construct %337, %338, %339
-    %341:vec3<f32> = mul %340, %x_273
-    store %rgb, %341
-    %342:ptr<uniform, vec3<f32>, read> = access %x_269, 4u
-    %343:vec3<f32> = load %342
-    %x_279:vec3<f32> = let %343
-    %345:vec4<f32> = load %v_output1
-    %x_282:vec4<f32> = let %345
-    %347:f32 = access %x_282, 0u
-    %348:f32 = access %x_282, 1u
-    %349:f32 = access %x_282, 2u
-    %350:vec3<f32> = construct %347, %348, %349
-    %351:vec3<f32> = sub %x_279, %350
-    %352:vec3<f32> = normalize %351
-    store %output5, %352
-    store %output4, vec4<f32>(0.0f)
-    store %uvOffset, vec2<f32>(0.0f)
-    %353:ptr<uniform, f32, read> = access %x_269, 2u
-    %354:f32 = load %353
-    %x_292:f32 = let %354
-    %356:f32 = div 1.0f, %x_292
-    store %normalScale, %356
-    %357:bool = load %gl_FrontFacing
-    %x_298:bool = let %357
-    if %x_298 [t: $B8, f: $B9] {  # if_1
-      $B8: {  # true
-        %359:vec2<f32> = load %v_uv
-        %x_303:vec2<f32> = let %359
-        store %x_299, %x_303
-        exit_if  # if_1
+  float2 const x_307 = x_299;
+  TBNUV = x_307;
+  float4 const x_310 = (*tint_module_vars.v_output2);
+  float const x_312 = normalScale;
+  param_3 = (float3(x_310[0u], x_310[1u], x_310[2u]) * x_312);
+  float4 const x_317 = (*tint_module_vars.v_output1);
+  param_4 = float3(x_317[0u], x_317[1u], x_317[2u]);
+  float2 const x_320 = TBNUV;
+  param_5 = x_320;
+  float2 const x_324 = (*tint_module_vars.x_269).tangentSpaceParameter0;
+  param_6 = x_324;
+  float3x3 const x_325 = cotangent_frame_vf3_vf3_vf2_vf2_((&param_3), (&param_4), (&param_5), (&param_6));
+  TBN = x_325;
+  float3x3 const x_328 = TBN;
+  param_7 = x_328;
+  float3x3 const x_329 = transposeMat3_mf33_((&param_7));
+  invTBN = x_329;
+  float3x3 const x_331 = invTBN;
+  float3 const x_332 = output5;
+  float3 const x_334 = (x_331 * -(x_332));
+  float3x3 const x_337 = invTBN;
+  float3 const x_338 = output5;
+  parallaxLimit = (length(float2(x_334[0u], x_334[1u])) / (x_337 * -(x_338))[2u]);
+  float const x_345 = (*tint_module_vars.x_269).u_parallaxScale;
+  float const x_346 = parallaxLimit;
+  parallaxLimit = (x_346 * x_345);
+  float3x3 const x_349 = invTBN;
+  float3 const x_350 = output5;
+  float3 const x_352 = (x_349 * -(x_350));
+  vOffsetDir = normalize(float2(x_352[0u], x_352[1u]));
+  float2 const x_356 = vOffsetDir;
+  float const x_357 = parallaxLimit;
+  vMaxOffset = (x_356 * x_357);
+  float3x3 const x_361 = invTBN;
+  float3 const x_362 = output5;
+  float3x3 const x_365 = invTBN;
+  float4 const x_366 = (*tint_module_vars.v_output2);
+  numSamples = (15.0f + (dot((x_361 * -(x_362)), (x_365 * float3(x_366[0u], x_366[1u], x_366[2u]))) * -11.0f));
+  float const x_374 = numSamples;
+  stepSize = (1.0f / x_374);
+  currRayHeight = 1.0f;
+  vCurrOffset = float2(0.0f);
+  vLastOffset = float2(0.0f);
+  lastSampledHeight = 1.0f;
+  currSampledHeight = 1.0f;
+  i = 0;
+  {
+    while(true) {
+      int const x_388 = i;
+      if ((x_388 < 15)) {
+      } else {
+        break;
       }
-      $B9: {  # false
-        %361:vec2<f32> = load %v_uv
-        %x_305:vec2<f32> = let %361
-        %363:vec2<f32> = negation %x_305
-        store %x_299, %363
-        exit_if  # if_1
+      float2 const x_394 = (*tint_module_vars.v_uv);
+      float2 const x_395 = vCurrOffset;
+      float4 const x_397 = float4(0.0f);
+      currSampledHeight = x_397[3u];
+      float const x_400 = currSampledHeight;
+      float const x_401 = currRayHeight;
+      if ((x_400 > x_401)) {
+        float const x_406 = currSampledHeight;
+        float const x_407 = currRayHeight;
+        delta1 = (x_406 - x_407);
+        float const x_410 = currRayHeight;
+        float const x_411 = stepSize;
+        float const x_413 = lastSampledHeight;
+        delta2 = ((x_410 + x_411) - x_413);
+        float const x_416 = delta1;
+        float const x_417 = delta1;
+        float const x_418 = delta2;
+        ratio = (x_416 / (x_417 + x_418));
+        float const x_421 = ratio;
+        float2 const x_422 = vLastOffset;
+        float const x_424 = ratio;
+        float2 const x_426 = vCurrOffset;
+        vCurrOffset = ((x_422 * x_421) + (x_426 * (1.0f - x_424)));
+        break;
+      } else {
+        float const x_431 = stepSize;
+        float const x_432 = currRayHeight;
+        currRayHeight = (x_432 - x_431);
+        float2 const x_434 = vCurrOffset;
+        vLastOffset = x_434;
+        float const x_435 = stepSize;
+        float2 const x_436 = vMaxOffset;
+        float2 const x_438 = vCurrOffset;
+        vCurrOffset = (x_438 + (x_436 * x_435));
+        float const x_440 = currSampledHeight;
+        lastSampledHeight = x_440;
       }
+      {
+        int const x_441 = i;
+        i = (x_441 + 1);
+      }
+      continue;
     }
-    %364:vec2<f32> = load %x_299
-    %x_307:vec2<f32> = let %364
-    store %TBNUV, %x_307
-    %366:vec4<f32> = load %v_output2
-    %x_310:vec4<f32> = let %366
-    %368:f32 = load %normalScale
-    %x_312:f32 = let %368
-    %370:f32 = access %x_310, 0u
-    %371:f32 = access %x_310, 1u
-    %372:f32 = access %x_310, 2u
-    %373:vec3<f32> = construct %370, %371, %372
-    %374:vec3<f32> = mul %373, %x_312
-    store %param_3, %374
-    %375:vec4<f32> = load %v_output1
-    %x_317:vec4<f32> = let %375
-    %377:f32 = access %x_317, 0u
-    %378:f32 = access %x_317, 1u
-    %379:f32 = access %x_317, 2u
-    %380:vec3<f32> = construct %377, %378, %379
-    store %param_4, %380
-    %381:vec2<f32> = load %TBNUV
-    %x_320:vec2<f32> = let %381
-    store %param_5, %x_320
-    %383:ptr<uniform, vec2<f32>, read> = access %x_269, 8u
-    %384:vec2<f32> = load %383
-    %x_324:vec2<f32> = let %384
-    store %param_6, %x_324
-    %386:mat3x3<f32> = call %cotangent_frame_vf3_vf3_vf2_vf2_, %param_3, %param_4, %param_5, %param_6
-    %x_325:mat3x3<f32> = let %386
-    store %TBN, %x_325
-    %388:mat3x3<f32> = load %TBN
-    %x_328:mat3x3<f32> = let %388
-    store %param_7, %x_328
-    %390:mat3x3<f32> = call %transposeMat3_mf33_, %param_7
-    %x_329:mat3x3<f32> = let %390
-    store %invTBN, %x_329
-    %392:mat3x3<f32> = load %invTBN
-    %x_331:mat3x3<f32> = let %392
-    %394:vec3<f32> = load %output5
-    %x_332:vec3<f32> = let %394
-    %396:vec3<f32> = negation %x_332
-    %397:vec3<f32> = mul %x_331, %396
-    %x_334:vec3<f32> = let %397
-    %399:mat3x3<f32> = load %invTBN
-    %x_337:mat3x3<f32> = let %399
-    %401:vec3<f32> = load %output5
-    %x_338:vec3<f32> = let %401
-    %403:f32 = access %x_334, 0u
-    %404:f32 = access %x_334, 1u
-    %405:vec2<f32> = construct %403, %404
-    %406:f32 = length %405
-    %407:vec3<f32> = negation %x_338
-    %408:vec3<f32> = mul %x_337, %407
-    %409:f32 = access %408, 2u
-    %410:f32 = div %406, %409
-    store %parallaxLimit, %410
-    %411:ptr<uniform, f32, read> = access %x_269, 5u
-    %412:f32 = load %411
-    %x_345:f32 = let %412
-    %414:f32 = load %parallaxLimit
-    %x_346:f32 = let %414
-    %416:f32 = mul %x_346, %x_345
-    store %parallaxLimit, %416
-    %417:mat3x3<f32> = load %invTBN
-    %x_349:mat3x3<f32> = let %417
-    %419:vec3<f32> = load %output5
-    %x_350:vec3<f32> = let %419
-    %421:vec3<f32> = negation %x_350
-    %422:vec3<f32> = mul %x_349, %421
-    %x_352:vec3<f32> = let %422
-    %424:f32 = access %x_352, 0u
-    %425:f32 = access %x_352, 1u
-    %426:vec2<f32> = construct %424, %425
-    %427:vec2<f32> = normalize %426
-    store %vOffsetDir, %427
-    %428:vec2<f32> = load %vOffsetDir
-    %x_356:vec2<f32> = let %428
-    %430:f32 = load %parallaxLimit
-    %x_357:f32 = let %430
-    %432:vec2<f32> = mul %x_356, %x_357
-    store %vMaxOffset, %432
-    %433:mat3x3<f32> = load %invTBN
-    %x_361:mat3x3<f32> = let %433
-    %435:vec3<f32> = load %output5
-    %x_362:vec3<f32> = let %435
-    %437:mat3x3<f32> = load %invTBN
-    %x_365:mat3x3<f32> = let %437
-    %439:vec4<f32> = load %v_output2
-    %x_366:vec4<f32> = let %439
-    %441:vec3<f32> = negation %x_362
-    %442:vec3<f32> = mul %x_361, %441
-    %443:f32 = access %x_366, 0u
-    %444:f32 = access %x_366, 1u
-    %445:f32 = access %x_366, 2u
-    %446:vec3<f32> = construct %443, %444, %445
-    %447:vec3<f32> = mul %x_365, %446
-    %448:f32 = dot %442, %447
-    %449:f32 = mul %448, -11.0f
-    %450:f32 = add 15.0f, %449
-    store %numSamples, %450
-    %451:f32 = load %numSamples
-    %x_374:f32 = let %451
-    %453:f32 = div 1.0f, %x_374
-    store %stepSize, %453
-    store %currRayHeight, 1.0f
-    store %vCurrOffset, vec2<f32>(0.0f)
-    store %vLastOffset, vec2<f32>(0.0f)
-    store %lastSampledHeight, 1.0f
-    store %currSampledHeight, 1.0f
-    store %i, 0i
-    loop [b: $B10, c: $B11] {  # loop_1
-      $B10: {  # body
-        %454:i32 = load %i
-        %x_388:i32 = let %454
-        %456:bool = lt %x_388, 15i
-        if %456 [t: $B12, f: $B13] {  # if_2
-          $B12: {  # true
-            exit_if  # if_2
-          }
-          $B13: {  # false
-            exit_loop  # loop_1
-          }
-        }
-        %457:vec2<f32> = load %v_uv
-        %x_394:vec2<f32> = let %457
-        %459:vec2<f32> = load %vCurrOffset
-        %x_395:vec2<f32> = let %459
-        %x_397:vec4<f32> = let vec4<f32>(0.0f)
-        %462:f32 = access %x_397, 3u
-        store %currSampledHeight, %462
-        %463:f32 = load %currSampledHeight
-        %x_400:f32 = let %463
-        %465:f32 = load %currRayHeight
-        %x_401:f32 = let %465
-        %467:bool = gt %x_400, %x_401
-        if %467 [t: $B14, f: $B15] {  # if_3
-          $B14: {  # true
-            %468:f32 = load %currSampledHeight
-            %x_406:f32 = let %468
-            %470:f32 = load %currRayHeight
-            %x_407:f32 = let %470
-            %472:f32 = sub %x_406, %x_407
-            store %delta1, %472
-            %473:f32 = load %currRayHeight
-            %x_410:f32 = let %473
-            %475:f32 = load %stepSize
-            %x_411:f32 = let %475
-            %477:f32 = load %lastSampledHeight
-            %x_413:f32 = let %477
-            %479:f32 = add %x_410, %x_411
-            %480:f32 = sub %479, %x_413
-            store %delta2, %480
-            %481:f32 = load %delta1
-            %x_416:f32 = let %481
-            %483:f32 = load %delta1
-            %x_417:f32 = let %483
-            %485:f32 = load %delta2
-            %x_418:f32 = let %485
-            %487:f32 = add %x_417, %x_418
-            %488:f32 = div %x_416, %487
-            store %ratio, %488
-            %489:f32 = load %ratio
-            %x_421:f32 = let %489
-            %491:vec2<f32> = load %vLastOffset
-            %x_422:vec2<f32> = let %491
-            %493:f32 = load %ratio
-            %x_424:f32 = let %493
-            %495:vec2<f32> = load %vCurrOffset
-            %x_426:vec2<f32> = let %495
-            %497:vec2<f32> = mul %x_422, %x_421
-            %498:f32 = sub 1.0f, %x_424
-            %499:vec2<f32> = mul %x_426, %498
-            %500:vec2<f32> = add %497, %499
-            store %vCurrOffset, %500
-            exit_loop  # loop_1
-          }
-          $B15: {  # false
-            %501:f32 = load %stepSize
-            %x_431:f32 = let %501
-            %503:f32 = load %currRayHeight
-            %x_432:f32 = let %503
-            %505:f32 = sub %x_432, %x_431
-            store %currRayHeight, %505
-            %506:vec2<f32> = load %vCurrOffset
-            %x_434:vec2<f32> = let %506
-            store %vLastOffset, %x_434
-            %508:f32 = load %stepSize
-            %x_435:f32 = let %508
-            %510:vec2<f32> = load %vMaxOffset
-            %x_436:vec2<f32> = let %510
-            %512:vec2<f32> = load %vCurrOffset
-            %x_438:vec2<f32> = let %512
-            %514:vec2<f32> = mul %x_436, %x_435
-            %515:vec2<f32> = add %x_438, %514
-            store %vCurrOffset, %515
-            %516:f32 = load %currSampledHeight
-            %x_440:f32 = let %516
-            store %lastSampledHeight, %x_440
-            exit_if  # if_3
-          }
-        }
-        continue  # -> $B11
-      }
-      $B11: {  # continuing
-        %518:i32 = load %i
-        %x_441:i32 = let %518
-        %520:i32 = add %x_441, 1i
-        store %i, %520
-        next_iteration  # -> $B10
-      }
-    }
-    %521:vec2<f32> = load %vCurrOffset
-    %x_444:vec2<f32> = let %521
-    store %parallaxOcclusion_0, %x_444
-    %523:vec2<f32> = load %parallaxOcclusion_0
-    %x_445:vec2<f32> = let %523
-    store %uvOffset, %x_445
-    %525:vec2<f32> = load %v_uv
-    %x_449:vec2<f32> = let %525
-    %527:vec2<f32> = load %uvOffset
-    %x_450:vec2<f32> = let %527
-    %529:texture_2d<f32> = load %TextureSamplerTexture
-    %530:sampler = load %TextureSamplerSampler
-    %531:vec2<f32> = add %x_449, %x_450
-    %532:vec4<f32> = textureSample %529, %530, %531
-    %x_452:vec4<f32> = let %532
-    %534:ptr<uniform, f32, read> = access %x_269, 2u
-    %535:f32 = load %534
-    %x_454:f32 = let %535
-    %537:mat3x3<f32> = load %TBN
-    %x_457:mat3x3<f32> = let %537
-    store %param_8, %x_457
-    %539:f32 = access %x_452, 0u
-    %540:f32 = access %x_452, 1u
-    %541:f32 = access %x_452, 2u
-    %542:vec3<f32> = construct %539, %540, %541
-    store %param_9, %542
-    %543:f32 = div 1.0f, %x_454
-    store %param_10, %543
-    %544:vec3<f32> = call %perturbNormal_mf33_vf3_f1_, %param_8, %param_9, %param_10
-    %x_461:vec3<f32> = let %544
-    %546:vec4<f32> = load %output4
-    %x_462:vec4<f32> = let %546
-    %548:f32 = access %x_461, 0u
-    %549:f32 = access %x_461, 1u
-    %550:f32 = access %x_461, 2u
-    %551:f32 = access %x_462, 3u
-    %552:vec4<f32> = construct %548, %549, %550, %551
-    store %output4, %552
-    %553:vec2<f32> = load %v_uv
-    %x_465:vec2<f32> = let %553
-    %555:vec2<f32> = load %uvOffset
-    %x_466:vec2<f32> = let %555
-    %557:vec2<f32> = add %x_465, %x_466
-    store %output6, %557
-    %558:vec2<f32> = load %output6
-    %x_474:vec2<f32> = let %558
-    %560:texture_2d<f32> = load %TextureSampler1Texture
-    %561:sampler = load %TextureSampler1Sampler
-    %562:vec4<f32> = textureSample %560, %561, %x_474
-    %x_475:vec4<f32> = let %562
-    store %tempTextureRead1, %x_475
-    %564:vec4<f32> = load %tempTextureRead1
-    %x_477:vec4<f32> = let %564
-    %566:f32 = access %x_477, 0u
-    %567:f32 = access %x_477, 1u
-    %568:f32 = access %x_477, 2u
-    %569:vec3<f32> = construct %566, %567, %568
-    store %rgb1, %569
-    %570:ptr<uniform, vec3<f32>, read> = access %x_269, 4u
-    %571:vec3<f32> = load %570
-    %x_481:vec3<f32> = let %571
-    %573:vec4<f32> = load %v_output1
-    %x_482:vec4<f32> = let %573
-    %575:f32 = access %x_482, 0u
-    %576:f32 = access %x_482, 1u
-    %577:f32 = access %x_482, 2u
-    %578:vec3<f32> = construct %575, %576, %577
-    %579:vec3<f32> = sub %x_481, %578
-    %580:vec3<f32> = normalize %579
-    store %viewDirectionW_1, %580
-    store %shadow, 1.0f
-    %581:f32 = load %u_Float
-    %x_488:f32 = let %581
-    %583:f32 = mul 1.0f, %x_488
-    store %glossiness_1, %583
-    store %diffuseBase, vec3<f32>(0.0f)
-    store %specularBase, vec3<f32>(0.0f)
-    %584:vec4<f32> = load %output4
-    %x_494:vec4<f32> = let %584
-    %586:f32 = access %x_494, 0u
-    %587:f32 = access %x_494, 1u
-    %588:f32 = access %x_494, 2u
-    %589:vec3<f32> = construct %586, %587, %588
-    store %normalW, %589
-    %590:vec3<f32> = load %viewDirectionW_1
-    %x_501:vec3<f32> = let %590
-    store %param_11, %x_501
-    %592:vec3<f32> = load %normalW
-    %x_503:vec3<f32> = let %592
-    store %param_12, %x_503
-    %594:ptr<uniform, vec4<f32>, read> = access %light0, 0u
-    %595:vec4<f32> = load %594
-    %x_507:vec4<f32> = let %595
-    store %param_13, %x_507
-    %597:ptr<uniform, vec4<f32>, read> = access %light0, 1u
-    %598:vec4<f32> = load %597
-    %x_510:vec4<f32> = let %598
-    %600:f32 = access %x_510, 0u
-    %601:f32 = access %x_510, 1u
-    %602:f32 = access %x_510, 2u
-    %603:vec3<f32> = construct %600, %601, %602
-    store %param_14, %603
-    %604:ptr<uniform, vec4<f32>, read> = access %light0, 2u
-    %605:vec4<f32> = load %604
-    %x_514:vec4<f32> = let %605
-    %607:f32 = access %x_514, 0u
-    %608:f32 = access %x_514, 1u
-    %609:f32 = access %x_514, 2u
-    %610:vec3<f32> = construct %607, %608, %609
-    store %param_15, %610
-    %611:ptr<uniform, vec3<f32>, read> = access %light0, 3u
-    %612:vec3<f32> = load %611
-    %x_518:vec3<f32> = let %612
-    store %param_16, %x_518
-    %614:f32 = load %glossiness_1
-    %x_520:f32 = let %614
-    store %param_17, %x_520
-    %616:lightingInfo = call %computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_, %param_11, %param_12, %param_13, %param_14, %param_15, %param_16, %param_17
-    %x_521:lightingInfo = let %616
-    store %info, %x_521
-    store %shadow, 1.0f
-    %618:ptr<function, vec3<f32>, read_write> = access %info, 0u
-    %619:vec3<f32> = load %618
-    %x_523:vec3<f32> = let %619
-    %621:f32 = load %shadow
-    %x_524:f32 = let %621
-    %623:vec3<f32> = load %diffuseBase
-    %x_526:vec3<f32> = let %623
-    %625:vec3<f32> = mul %x_523, %x_524
-    %626:vec3<f32> = add %x_526, %625
-    store %diffuseBase, %626
-    %627:ptr<function, vec3<f32>, read_write> = access %info, 1u
-    %628:vec3<f32> = load %627
-    %x_529:vec3<f32> = let %628
-    %630:f32 = load %shadow
-    %x_530:f32 = let %630
-    %632:vec3<f32> = load %specularBase
-    %x_532:vec3<f32> = let %632
-    %634:vec3<f32> = mul %x_529, %x_530
-    %635:vec3<f32> = add %x_532, %634
-    store %specularBase, %635
-    %636:vec3<f32> = load %diffuseBase
-    %x_535:vec3<f32> = let %636
-    %638:vec3<f32> = load %rgb1
-    %x_536:vec3<f32> = let %638
-    %640:vec3<f32> = mul %x_535, %x_536
-    store %diffuseOutput, %640
-    %641:vec3<f32> = load %specularBase
-    %x_539:vec3<f32> = let %641
-    %643:vec3<f32> = load %u_Color
-    %x_540:vec3<f32> = let %643
-    %645:vec3<f32> = mul %x_539, %x_540
-    store %specularOutput, %645
-    %646:vec3<f32> = load %diffuseOutput
-    %x_543:vec3<f32> = let %646
-    %648:vec3<f32> = load %specularOutput
-    %x_544:vec3<f32> = let %648
-    %650:vec3<f32> = add %x_543, %x_544
-    store %output3, %650
-    %651:vec3<f32> = load %output3
-    %x_548:vec3<f32> = let %651
-    %653:f32 = access %x_548, 0u
-    %654:f32 = access %x_548, 1u
-    %655:f32 = access %x_548, 2u
-    %656:vec4<f32> = construct %653, %654, %655, 1.0f
-    store %glFragColor, %656
-    ret
   }
-}
-%tint_symbol = @fragment func(%vMainuv_param:vec2<f32> [@location(1)], %v_output1_param:vec4<f32> [@location(0)], %gl_FrontFacing_param:bool [@front_facing], %v_uv_param:vec2<f32> [@location(3)], %v_output2_param:vec4<f32> [@location(2)]):main_out {
-  $B16: {
-    store %vMainuv, %vMainuv_param
-    store %v_output1, %v_output1_param
-    store %gl_FrontFacing, %gl_FrontFacing_param
-    store %v_uv, %v_uv_param
-    store %v_output2, %v_output2_param
-    %663:void = call %main_1
-    %664:vec4<f32> = load %glFragColor
-    %665:main_out = construct %664
-    ret %665
-  }
+  float2 const x_444 = vCurrOffset;
+  parallaxOcclusion_0 = x_444;
+  float2 const x_445 = parallaxOcclusion_0;
+  uvOffset = x_445;
+  float2 const x_449 = (*tint_module_vars.v_uv);
+  float2 const x_450 = uvOffset;
+  float4 const x_452 = tint_module_vars.TextureSamplerTexture.sample(tint_module_vars.TextureSamplerSampler, (x_449 + x_450));
+  float const x_454 = (*tint_module_vars.x_269).u_bumpStrength;
+  float3x3 const x_457 = TBN;
+  param_8 = x_457;
+  param_9 = float3(x_452[0u], x_452[1u], x_452[2u]);
+  param_10 = (1.0f / x_454);
+  float3 const x_461 = perturbNormal_mf33_vf3_f1_((&param_8), (&param_9), (&param_10));
+  float4 const x_462 = output4;
+  output4 = float4(x_461[0u], x_461[1u], x_461[2u], x_462[3u]);
+  float2 const x_465 = (*tint_module_vars.v_uv);
+  float2 const x_466 = uvOffset;
+  output6 = (x_465 + x_466);
+  float2 const x_474 = output6;
+  float4 const x_475 = tint_module_vars.TextureSampler1Texture.sample(tint_module_vars.TextureSampler1Sampler, x_474);
+  tempTextureRead1 = x_475;
+  float4 const x_477 = tempTextureRead1;
+  rgb1 = float3(x_477[0u], x_477[1u], x_477[2u]);
+  float3 const x_481 = (*tint_module_vars.x_269).u_cameraPosition;
+  float4 const x_482 = (*tint_module_vars.v_output1);
+  viewDirectionW_1 = normalize((x_481 - float3(x_482[0u], x_482[1u], x_482[2u])));
+  shadow = 1.0f;
+  float const x_488 = (*tint_module_vars.u_Float);
+  glossiness_1 = (1.0f * x_488);
+  diffuseBase = float3(0.0f);
+  specularBase = float3(0.0f);
+  float4 const x_494 = output4;
+  normalW = float3(x_494[0u], x_494[1u], x_494[2u]);
+  float3 const x_501 = viewDirectionW_1;
+  param_11 = x_501;
+  float3 const x_503 = normalW;
+  param_12 = x_503;
+  float4 const x_507 = (*tint_module_vars.light0).vLightData;
+  param_13 = x_507;
+  float4 const x_510 = (*tint_module_vars.light0).vLightDiffuse;
+  param_14 = float3(x_510[0u], x_510[1u], x_510[2u]);
+  float4 const x_514 = (*tint_module_vars.light0).vLightSpecular;
+  param_15 = float3(x_514[0u], x_514[1u], x_514[2u]);
+  float3 const x_518 = (*tint_module_vars.light0).vLightGround;
+  param_16 = x_518;
+  float const x_520 = glossiness_1;
+  param_17 = x_520;
+  lightingInfo const x_521 = computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_((&param_11), (&param_12), (&param_13), (&param_14), (&param_15), (&param_16), (&param_17));
+  info = x_521;
+  shadow = 1.0f;
+  float3 const x_523 = info.diffuse;
+  float const x_524 = shadow;
+  float3 const x_526 = diffuseBase;
+  diffuseBase = (x_526 + (x_523 * x_524));
+  float3 const x_529 = info.specular;
+  float const x_530 = shadow;
+  float3 const x_532 = specularBase;
+  specularBase = (x_532 + (x_529 * x_530));
+  float3 const x_535 = diffuseBase;
+  float3 const x_536 = rgb1;
+  diffuseOutput = (x_535 * x_536);
+  float3 const x_539 = specularBase;
+  float3 const x_540 = (*tint_module_vars.u_Color);
+  specularOutput = (x_539 * x_540);
+  float3 const x_543 = diffuseOutput;
+  float3 const x_544 = specularOutput;
+  output3 = (x_543 + x_544);
+  float3 const x_548 = output3;
+  (*tint_module_vars.glFragColor) = float4(x_548[0u], x_548[1u], x_548[2u], 1.0f);
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+main_out tint_symbol_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, tint_module_vars_struct tint_module_vars) {
+  (*tint_module_vars.vMainuv) = vMainuv_param;
+  (*tint_module_vars.v_output1) = v_output1_param;
+  (*tint_module_vars.gl_FrontFacing) = gl_FrontFacing_param;
+  (*tint_module_vars.v_uv) = v_uv_param;
+  (*tint_module_vars.v_output2) = v_output2_param;
+  main_1(tint_module_vars);
+  return main_out{.glFragColor_1=(*tint_module_vars.glFragColor)};
+}
+
+fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], bool gl_FrontFacing_param [[front_facing]], texture2d<float, access::sample> TextureSamplerTexture [[texture(0)]], sampler TextureSamplerSampler [[sampler(0)]], const constant LeftOver* x_269 [[buffer(0)]], texture2d<float, access::sample> TextureSampler1Texture [[texture(1)]], sampler TextureSampler1Sampler [[sampler(1)]], const constant Light0* light0 [[buffer(1)]]) {
+  thread float u_Float = 0.0f;
+  thread float3 u_Color = 0.0f;
+  thread float2 vMainuv = 0.0f;
+  thread float4 v_output1 = 0.0f;
+  thread bool gl_FrontFacing = false;
+  thread float2 v_uv = 0.0f;
+  thread float4 v_output2 = 0.0f;
+  thread float4 glFragColor = 0.0f;
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u_Float=(&u_Float), .u_Color=(&u_Color), .TextureSamplerTexture=TextureSamplerTexture, .TextureSamplerSampler=TextureSamplerSampler, .vMainuv=(&vMainuv), .x_269=x_269, .v_output1=(&v_output1), .gl_FrontFacing=(&gl_FrontFacing), .v_uv=(&v_uv), .v_output2=(&v_output2), .TextureSampler1Texture=TextureSampler1Texture, .TextureSampler1Sampler=TextureSampler1Sampler, .light0=light0, .glFragColor=(&glFragColor)};
+  return tint_symbol_outputs{.main_out_glFragColor_1=tint_symbol_inner(inputs.vMainuv_param, inputs.v_output1_param, gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param, tint_module_vars).glFragColor_1};
+}
+program_source:331:20: warning: unused variable 'x_394' [-Wunused-variable]
+      float2 const x_394 = (*tint_module_vars.v_uv);
+                   ^
+program_source:332:20: warning: unused variable 'x_395' [-Wunused-variable]
+      float2 const x_395 = vCurrOffset;
+                   ^
+program_source:465:484: error: call to deleted constructor of 'texture2d<float, access::sample>'
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u_Float=(&u_Float), .u_Color=(&u_Color), .TextureSamplerTexture=TextureSamplerTexture, .TextureSamplerSampler=TextureSamplerSampler, .vMainuv=(&vMainuv), .x_269=x_269, .v_output1=(&v_output1), .gl_FrontFacing=(&gl_FrontFacing), .v_uv=(&v_uv), .v_output2=(&v_output2), .TextureSampler1Texture=TextureSampler1Texture, .TextureSampler1Sampler=TextureSampler1Sampler, .light0=light0, .glFragColor=(&glFragColor)};
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
+  texture2d() thread = delete;
+  ^
+program_source:47:36: note: in implicit initialization of field 'bumpSamplerTexture' with omitted initializer
+  texture2d<float, access::sample> bumpSamplerTexture;
+                                   ^
+
diff --git a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl
+++ b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl
+++ b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl
index 3198de1..bb4c1ed 100644
--- a/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/1588cd.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_1588cd(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_1588cd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl
index 65b2662..333bef1 100644
--- a/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/61b1c7.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_61b1c7(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_61b1c7(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_61b1c7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_61b1c7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl
index 29c63bf..e990af6 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_8421b9(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_8421b9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl
index 73d9087..6865212 100644
--- a/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/a0f5ca.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_a0f5ca(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_a0f5ca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl
index 1d88fc5..dc05097 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_cbd6b5(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 2u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cbd6b5(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cbd6b5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_cbd6b5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl
index e90fb29..a112177 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cdd123.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_cdd123(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cdd123(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cdd123(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_cdd123(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl
index 91ae415..f4b5f28 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cfca0a.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cfca0a(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cfca0a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl
index 9c17fb3..9a7302b 100644
--- a/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/eb510f.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_eb510f(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_eb510f(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_eb510f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_eb510f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl
index c7f5330..6b2adcb 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/794055.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicAdd_794055(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl
index 9d1a49d..5dc7ca6 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicAdd_8a199a(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_8a199a(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_8a199a(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl
index d7401b0..66b04f5 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicAdd_d32fe4(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_d32fe4(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_d32fe4(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl
index 386893d..6f19239 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAdd/d5db1d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicAdd_d5db1d(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl
index c906f60..c765a5d 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicAnd_152966(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_152966(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_152966(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl
index 8cea45d26..c320e04 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/34edd3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicAnd_34edd3(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl
index a4b4ed5..29e6015 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/45a819.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicAnd_45a819(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl
index ac6f6a3..b6632a4 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicAnd_85a8d9(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_85a8d9(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_85a8d9(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl
index 07f5afa..3df26cb 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/0a5dca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicExchange_0a5dca(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl
index af8bea9..5bdebe1 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicExchange_d59712(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_d59712(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_d59712(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl
index aa78e3f..75a6ba3 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/e114ba.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicExchange_e114ba(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl
index 7ad7861..9d54aa4 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicExchange_f2e22f(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_f2e22f(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_f2e22f(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl
index 08b4826..97bce3e 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicLoad_0806ad(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_0806ad(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_0806ad(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl
index 1f3e31d..6ced326 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/361bf1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicLoad_361bf1(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl
index 486f376..08c566c 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/afcc03.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicLoad_afcc03(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl
index 7c18a05..2ca2601 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicLoad_fe6cc3(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_fe6cc3(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_fe6cc3(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl
index 4f1bbc3..817e219 100644
--- a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicMax_51b9be(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_51b9be(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_51b9be(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl
index 1e52fe2..f31ff37 100644
--- a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicMax_92aa72(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_92aa72(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_92aa72(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl
index 4606114..540a033 100644
--- a/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/a89cc3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicMax_a89cc3(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl
index fd203e7..f5bb3df 100644
--- a/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMax/beccfc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicMax_beccfc(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl
index cf5221a..b53bd50 100644
--- a/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/278235.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicMin_278235(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl
index ed6b6fe..88b1f95 100644
--- a/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/69d383.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicMin_69d383(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl
index e0f04c1..1a153ca 100644
--- a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicMin_8e38dc(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_8e38dc(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_8e38dc(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl
index 4239c8b..7ae726f 100644
--- a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicMin_c67a74(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_c67a74(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_c67a74(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl
index e371f71..9f94b7e 100644
--- a/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/5e3d61.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicOr_5e3d61(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl
index 63fa15a..b146432 100644
--- a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicOr_5e95d4(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_5e95d4(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_5e95d4(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl
index 497fee4..b05a8ca 100644
--- a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicOr_8d96a0(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_8d96a0(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_8d96a0(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl
index 4930b84..d393d4f 100644
--- a/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicOr/d09248.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicOr_d09248(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl
index 85512da..58ee6ef 100644
--- a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicSub_051100(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_051100(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_051100(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl
index 9903599..f81b4ea 100644
--- a/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/0d26c2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicSub_0d26c2(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl
index e6f6fc1..3facb1c 100644
--- a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicSub_15bfc9(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_15bfc9(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_15bfc9(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl
index dc3b4ff..3556edb 100644
--- a/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicSub/77883a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicSub_77883a(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl
index bfa8b5c..6e6efae 100644
--- a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicXor_54510e(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_54510e(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_54510e(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl
index 493fd57..6105556 100644
--- a/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/75dc95.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicXor_75dc95(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl
index 4929a9b..795548b 100644
--- a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicXor_c1b78c(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_c1b78c(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_c1b78c(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl
index 71faf1c..5f9d01f 100644
--- a/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/atomicXor/c8e6be.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicXor_c8e6be(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/subgroupBallot/7e6d0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBallot/7e6d0e.wgsl.expected.ir.msl
index c9de677..a839299 100644
--- a/test/tint/builtins/gen/literal/subgroupBallot/7e6d0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBallot/7e6d0e.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBallot_7e6d0e = func():void {
-  $B2: {
-    %3:vec4<u32> = subgroupBallot
-    %res:ptr<function, vec4<u32>, read_write> = var, %3
-    %5:vec4<u32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBallot_7e6d0e
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBallot
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl
index 9adced4..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_07e2d8 = func():void {
-  $B2: {
-    %3:f16 = subgroupBroadcast 1.0h, 1u
-    %res:ptr<function, f16, read_write> = var, %3
-    %5:f16 = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_07e2d8
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/08beca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/08beca.wgsl.expected.ir.msl
index 34c7b15..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/08beca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/08beca.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_08beca = func():void {
-  $B2: {
-    %3:f32 = subgroupBroadcast 1.0f, 1u
-    %res:ptr<function, f32, read_write> = var, %3
-    %5:f32 = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_08beca
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl
index a65f913..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_0f44e2 = func():void {
-  $B2: {
-    %3:vec4<f16> = subgroupBroadcast vec4<f16>(1.0h), 1u
-    %res:ptr<function, vec4<f16>, read_write> = var, %3
-    %5:vec4<f16> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_0f44e2
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/13f36c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/13f36c.wgsl.expected.ir.msl
index 4d4ef64..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/13f36c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/13f36c.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_13f36c = func():void {
-  $B2: {
-    %3:vec2<f16> = subgroupBroadcast vec2<f16>(1.0h), 1u
-    %res:ptr<function, vec2<f16>, read_write> = var, %3
-    %5:vec2<f16> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_13f36c
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl
index 63daf07..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_1d79c7 = func():void {
-  $B2: {
-    %3:i32 = subgroupBroadcast 1i, 1u
-    %res:ptr<function, i32, read_write> = var, %3
-    %5:i32 = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_1d79c7
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/279027.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/279027.wgsl.expected.ir.msl
index 679738c..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/279027.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/279027.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_279027 = func():void {
-  $B2: {
-    %3:vec4<u32> = subgroupBroadcast vec4<u32>(1u), 1u
-    %res:ptr<function, vec4<u32>, read_write> = var, %3
-    %5:vec4<u32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_279027
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl
index 80f19a1..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_34fa3d = func():void {
-  $B2: {
-    %3:vec3<u32> = subgroupBroadcast vec3<u32>(1u), 1u
-    %res:ptr<function, vec3<u32>, read_write> = var, %3
-    %5:vec3<u32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_34fa3d
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/3e6879.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/3e6879.wgsl.expected.ir.msl
index 35f09ee..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/3e6879.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/3e6879.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_3e6879 = func():void {
-  $B2: {
-    %3:vec2<i32> = subgroupBroadcast vec2<i32>(1i), 1u
-    %res:ptr<function, vec2<i32>, read_write> = var, %3
-    %5:vec2<i32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_3e6879
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl
index ae9da25..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_41e5d7 = func():void {
-  $B2: {
-    %3:vec3<f16> = subgroupBroadcast vec3<f16>(1.0h), 1u
-    %res:ptr<function, vec3<f16>, read_write> = var, %3
-    %5:vec3<f16> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_41e5d7
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/4a4334.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/4a4334.wgsl.expected.ir.msl
index f5c29ef..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/4a4334.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/4a4334.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_4a4334 = func():void {
-  $B2: {
-    %3:vec2<u32> = subgroupBroadcast vec2<u32>(1u), 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %3
-    %5:vec2<u32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_4a4334
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/5196c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/5196c8.wgsl.expected.ir.msl
index 01efdcb..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/5196c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/5196c8.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_5196c8 = func():void {
-  $B2: {
-    %3:vec2<f32> = subgroupBroadcast vec2<f32>(1.0f), 1u
-    %res:ptr<function, vec2<f32>, read_write> = var, %3
-    %5:vec2<f32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_5196c8
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/912ff5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/912ff5.wgsl.expected.ir.msl
index 5c9af34..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/912ff5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/912ff5.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_912ff5 = func():void {
-  $B2: {
-    %3:vec3<f32> = subgroupBroadcast vec3<f32>(1.0f), 1u
-    %res:ptr<function, vec3<f32>, read_write> = var, %3
-    %5:vec3<f32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_912ff5
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl
index a695582..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_b7e93b = func():void {
-  $B2: {
-    %3:vec4<f32> = subgroupBroadcast vec4<f32>(1.0f), 1u
-    %res:ptr<function, vec4<f32>, read_write> = var, %3
-    %5:vec4<f32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_b7e93b
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl
index 17ec2f5..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_c36fe1 = func():void {
-  $B2: {
-    %3:u32 = subgroupBroadcast 1u, 1u
-    %res:ptr<function, u32, read_write> = var, %3
-    %5:u32 = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_c36fe1
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/e275c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/e275c8.wgsl.expected.ir.msl
index c6955be..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/e275c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/e275c8.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_e275c8 = func():void {
-  $B2: {
-    %3:vec3<i32> = subgroupBroadcast vec3<i32>(1i), 1u
-    %res:ptr<function, vec3<i32>, read_write> = var, %3
-    %5:vec3<i32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_e275c8
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/subgroupBroadcast/f637f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBroadcast/f637f9.wgsl.expected.ir.msl
index c623b8c..a4963e5 100644
--- a/test/tint/builtins/gen/literal/subgroupBroadcast/f637f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBroadcast/f637f9.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_f637f9 = func():void {
-  $B2: {
-    %3:vec4<i32> = subgroupBroadcast vec4<i32>(1i), 1u
-    %res:ptr<function, vec4<i32>, read_write> = var, %3
-    %5:vec4<i32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBroadcast_f637f9
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
index 169fd2a..29d7b71 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00229f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00229f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
index 4c5110c..bebdffc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00348c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00348c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/01e21e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/01e21e.wgsl.expected.ir.msl
index 4187415..24d27ae 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/01e21e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/01e21e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_01e21e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01e21e(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01e21e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_01e21e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/01edb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/01edb1.wgsl.expected.ir.msl
index cf02e70..a588700 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/01edb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/01edb1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_01edb1(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01edb1(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01edb1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_01edb1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl
index 77536f8..23ee965 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_022903(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_022903(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl
index f7562e0..81aaa7c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_0276ec(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0276ec(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0276ec(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0276ec(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl
index 29559d9..2657fea 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_029589(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_029589(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_029589(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_029589(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl
index 318ca0f..a670692 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0329b0(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0329b0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033195.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/033195.wgsl.expected.ir.msl
index 320e3b7..254b69a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/033195.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/033195.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_033195(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033195(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033195(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_033195(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl
index 3d452ab..c86db2f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033ea7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033ea7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/038847.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/038847.wgsl.expected.ir.msl
index 4bba64f..b68d9cb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/038847.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/038847.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_038847(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_038847(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_038847(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_038847(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl
index 159f4cc..fdb8210 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_03f81e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_03f81e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_03f81e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_03f81e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
index 576e574..bf5796f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_07f1ba(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_07f1ba(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
index 00a16dd..36bee98 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_088918(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_088918(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
index 9b41bd5..b18b9cb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0890c6(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0890c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
index addf0b1..c99d4b4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_08e371(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_08e371(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl
index d292979..ac6d97e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_09140b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_09140b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_09140b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_09140b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl
index b58802a..2935fb0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_0973c9(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0973c9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0973c9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0973c9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
index fbd7cac..8f2693a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_0baa0d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0baa0d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0baa0d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0baa0d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl
index c674b4b..35ddbdf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_0c0b0c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0c0b0c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0c0b0c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0c0b0c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
index f233860..8118da9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0d4a7c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0d4a7c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl
index e74c173..361bf5c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_0de70c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0de70c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0de70c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0de70c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
index db0b83f..2d958e1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0ff9a4(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0ff9a4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
index 5af8a09..eafde47 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_135176(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_135176(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
index 4dbae9c..24329a5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_13f8db(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_13f8db(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
index abd2b98..1663c42 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_1417dd(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1417dd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1417dd(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_1417dd(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
index ae7eefa..3636748 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_15aa17(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15aa17(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15aa17(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_15aa17(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
index e2abc4e..2f1fbd7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15b577(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15b577(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl
index 5835676..3099d88 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_18160d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18160d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18160d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_18160d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
index 5ef22a3..ba0f617 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_18f19f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18f19f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18f19f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_18f19f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
index 4cdb058..334dbb1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1a2be7(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1a2be7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
index 757cfea..3fd61ac 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1b720f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1b720f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
index 5d30ba3..ff041d1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bc428(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bc428(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
index f7ebdea..5cf7b71 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bd78c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bd78c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl
index c012411..acdc94a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_1e4024(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1e4024(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1e4024(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_1e4024(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl
index c4a8adc..5ca429c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_20eaad(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20eaad(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20eaad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_20eaad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/20ecef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/20ecef.wgsl.expected.ir.msl
index 049363a..1ef6ae3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/20ecef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/20ecef.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_20ecef(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20ecef(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20ecef(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_20ecef(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl
index c63144d..ff479c9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_212362(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_212362(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
index f9133ae..1287d89 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_224113(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_224113(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_224113(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_224113(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
index 22dbec1..0d88f96 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_22b5b6(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_22b5b6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
index 8c37cc5..d6d85c5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_24db07(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_24db07(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
index fd936e9..26f2ffe 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_25d284(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_25d284(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_25d284(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_25d284(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
index 8b2d96e..2168dd3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_2674d8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2674d8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2674d8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_2674d8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
index bf453bd..1d1c3d6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_268ddb(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_268ddb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl
index 985ebc2..870d39d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_26d6bf(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_26d6bf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl
index bc1bc9e..3b2c363 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_282978(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_282978(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_282978(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_282978(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/283b58.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/283b58.wgsl.expected.ir.msl
index 96ad3b5..99b24ae 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/283b58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/283b58.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_283b58(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_283b58(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_283b58(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_283b58(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl
index f040e99..c58b410 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_284c27(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_284c27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl
index 24f378f..9c1f14b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_2a58b7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2a58b7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2a58b7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_2a58b7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl
index de002eb..066fa2f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2bafdf(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2bafdf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl
index 1d9387c..2a362b5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2dc5c5(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2dc5c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
index d5be9cd..0f67322 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2e443d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2e443d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
index 1aa5d0a..8d3fb58 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2fd2a4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2fd2a4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
index 3ca2b85..b0a9f88 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2ff32a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2ff32a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
index 6b066c9..8a66e26 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_305dd5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_305dd5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
index 885bd20..38591cf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_31799c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31799c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31799c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_31799c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl
index 91c855b..f33038b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_31d00d(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31d00d(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31d00d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_31d00d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl
index 3474616..efb9edd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_325338(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_325338(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_325338(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_325338(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
index 11cb56d..d972f72 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_346fee(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_346fee(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
index 8dee991..c108466 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_35a7e5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35a7e5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35a7e5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_35a7e5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
index df944b0..71931d5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_35ee69(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35ee69(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35ee69(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_35ee69(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl
index e80d0e0..4c4d3c6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_36eeb7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_36eeb7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_36eeb7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_36eeb7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
index e5e40c7..e15f4ba 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_378a65(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_378a65(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_378a65(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_378a65(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
index 730ff2c..a6faa9a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_382b16(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_382b16(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl
index 0e81a4d..ead2027 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_3834f8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3834f8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3834f8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3834f8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl
index f27eb36..2b81f43 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_38c9ca(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_38c9ca(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_38c9ca(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_38c9ca(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
index 1218125..f6b3f4a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3963d0(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3963d0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
index 709cf3f..35dd9f9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_397dab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_397dab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
index 05fb655..fed6d1c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_3a5bb1(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a5bb1(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a5bb1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3a5bb1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
index 4f79258..b530d91 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_3a7b69(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a7b69(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a7b69(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3a7b69(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl
index 1395305..ce16c57 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_3af3e7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3af3e7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3af3e7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3af3e7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
index 5c47a5f..50d9704 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3b38f6(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3b38f6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
index 78d634d..10cfce9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_3baab5(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3baab5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3baab5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3baab5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl
index 2abbe2d..156005e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_3bf12a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3bf12a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3bf12a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3bf12a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
index d48ec8d..0c1fd24 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3c66f0(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3c66f0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
index c0a98d9..55f437a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3f3474(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3f3474(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
index b686bec..63cf245 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3fc3dc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3fc3dc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
index 4383008..f995f40 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3ff0a5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3ff0a5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
index 2fd05be..75102f5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_40c671(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40c671(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40c671(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_40c671(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
index 78650dd9..a4196fe 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40da20(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40da20(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
index 2f8d38e..3783923 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_40ecf4(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40ecf4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40ecf4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_40ecf4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
index df58404..ddc15a3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_41545f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_41545f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_41545f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_41545f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
index be77074..4d2733a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_423519(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_423519(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl
index 176e644..2726bd8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_427f92(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_427f92(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_427f92(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_427f92(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
index 4d4ffa5..2c0d48b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_439651(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_439651(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_439651(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_439651(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
index 06aef59..d08cf90 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_445376(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_445376(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
index 9bc2856..2b72107 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_44b358(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_44b358(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_44b358(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_44b358(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
index d5a1d1d..cc367e1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_452fc1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_452fc1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_452fc1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_452fc1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
index f901eaa..826afa4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_46f0fc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_46f0fc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
index d5df6de..8f02f6c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4716a4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4716a4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
index 2a314cc..2107e97 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_475c10(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_475c10(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
index c6bd938..0ab3bc2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_49a067(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_49a067(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
index 830fc76..41b13b5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_4acec7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4acec7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4acec7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4acec7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
index 0a68cdf..e4dcf7e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_4b26ef(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4b26ef(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4b26ef(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4b26ef(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
index 437a6b4..c0d1713 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4be71b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4be71b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
index e7a2f30..ef8870f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d1f71(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d1f71(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl
index 051bea1..a54fac6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_4d27b3(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d27b3(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d27b3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4d27b3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl
index 11c0968..239179a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_4df14c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4df14c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4df14c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4df14c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4e540a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4e540a.wgsl.expected.ir.msl
index 886f1f4..7318b28 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4e540a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4e540a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_4e540a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4e540a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4e540a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4e540a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
index dcd383a..5708855 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_528c0e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_528c0e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
index ecf6389..4ddad09 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_52cf60(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_52cf60(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
index 964c4ed..e51f3e0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_534ef8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_534ef8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl
index 9425fde..30367a0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_542c62(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_542c62(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_542c62(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_542c62(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl
index f00f2cf..4f4f478 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_55fdeb(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_55fdeb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_55fdeb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_55fdeb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5703b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/5703b3.wgsl.expected.ir.msl
index a83ba12..1fb7a14 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/5703b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/5703b3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_5703b3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5703b3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5703b3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_5703b3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl
index 335fa7a..a1a81e5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_578e75(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_578e75(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_578e75(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_578e75(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl
index 1b63586..2f5010e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_579eee(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_579eee(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_579eee(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_579eee(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl
index bbabd7c..ebe9e00 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_58a82d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_58a82d(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_58a82d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_58a82d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
index 353232b..2a5c318 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_591981(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_591981(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_591981(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_591981(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
index 89d3b70..2c25b47 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_599ab5(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_599ab5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_599ab5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_599ab5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
index 3d85686..b5e53c1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_5b4b10(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5b4b10(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5b4b10(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_5b4b10(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl
index 6a52169..e00b0ff 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5df042(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5df042(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl
index f2ce1e9..63be980 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_607979(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_607979(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_607979(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_607979(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
index b0fbd56..335e985 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_609d34(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_609d34(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl
index 34c72fd..7cb7d97 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_617dc8(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_617dc8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_617dc8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_617dc8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
index 787fd75..a598afa 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62cb5a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62cb5a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
index ac84d5e..043783a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62e7ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62e7ae(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
index 3ffac79..861e449 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_64dc74(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_64dc74(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
index 7d105bd..0b33489 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_674058(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_674058(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_674058(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_674058(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
index f54e078..d932490 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dae40(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dae40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
index 0468fc9..0251c8d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dbef4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dbef4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
index b55f53b..a401ada 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e6c7a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e6c7a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
index 5ab98eb..cd0a0b7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e72c5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e72c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
index 514bca0..099103b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6f1b5d(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6f1b5d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl
index 5bcf9d6..87f8bb3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_709357(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_709357(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl
index 1b7e2ca..7e530e8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_70dd33(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_70dd33(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_70dd33(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_70dd33(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl
index d7f63c7..b8a42a3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_715917(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_715917(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_715917(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_715917(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl
index ed8c823..dd8c0d9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_7228de(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7228de(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7228de(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_7228de(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
index f18b128..f58592b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7327fa(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7327fa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/740e7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/740e7c.wgsl.expected.ir.msl
index 0ed5bd2..7d6fc20 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/740e7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/740e7c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_740e7c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_740e7c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_740e7c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_740e7c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
index 370e7e4..cb435b7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756031(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756031(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
index 8e7dd0c..9b06a7e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_756304(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756304(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756304(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_756304(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
index 4e4aca3..2e12906 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_790e57(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_790e57(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl
index 9fd5199..479a000 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_795fbb(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_795fbb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_795fbb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_795fbb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl
index 9c2d7eb..c553e5d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_797c30(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_797c30(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
index 0918417..ed6a4cd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_79d168(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_79d168(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
index 87080d8..36c3645 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a3890(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a3890(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
index ff4d31a..17205e5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a9e30(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a9e30(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl
index b04cd2b..db4d79e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c753b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c753b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl
index d4f8d50..9695e7e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_7c7c64(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c7c64(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c7c64(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_7c7c64(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl
index 8680939..0996aec 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7d8439(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7d8439(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl
index 607fd6c..610e69e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_7ea4b5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7ea4b5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7ea4b5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_7ea4b5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
index c89d489..79978c2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7edb05(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7edb05(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
index 1e28b2d..f9c8507 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8057cb(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8057cb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl
index 5f447c0..ecf648b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_8243a1(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8243a1(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8243a1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8243a1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl
index 9a2c4c2..2e89dd5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_835f90(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_835f90(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_835f90(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_835f90(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl
index 818e084..7b80f46 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_841ebe(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_841ebe(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl
index b7257e0..9577f10 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_84f363(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_84f363(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_84f363(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_84f363(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
index af73735..30c602f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_867ead(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_867ead(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_867ead(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_867ead(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
index 515bbd9..040ca2d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_879b73(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_879b73(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
index 501acb4..0a27bdd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_87b42d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_87b42d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
index 8bd64d8..017cb3e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_881dd4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_881dd4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8a2b17.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8a2b17.wgsl.expected.ir.msl
index 311386c..21bbe1e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8a2b17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8a2b17.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_8a2b17(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a2b17(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a2b17(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8a2b17(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
index 949efab..c211043 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_8a35f9(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a35f9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a35f9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8a35f9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
index 9261755..1748306 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8af728(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8af728(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl
index 75c916f..daa33cf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_8b9906(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8b9906(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8b9906(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8b9906(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl
index 3ccb435..c0b8a1a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_8bd369(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8bd369(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8bd369(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8bd369(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
index 8e26008..9ee3fde 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e15f4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e15f4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl
index 136c9f1..207a9de 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e5de6(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e5de6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl
index e25a363..390bfd7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_8efd47(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8efd47(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8efd47(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8efd47(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
index 19e21a0..7e6cdd6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_902179(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_902179(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_902179(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_902179(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
index 959b89b..53c0d7a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_904b0f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_904b0f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
index 9bf0cba..02532a7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_90dd74(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_90dd74(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_90dd74(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_90dd74(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl
index 1c715d5..8993313 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_91e3b4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_91e3b4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_91e3b4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_91e3b4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl
index bd05caa..9469458 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_920006(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_920006(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl
index 87cf5a2..d96c39f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_92552e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_92552e(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_92552e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_92552e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
index 4966fe9..1174f2c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_9573f3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9573f3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9573f3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_9573f3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl
index 1b24e3b..10b1d00 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_965645(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_965645(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
index e251473..f7cf713 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_98b2d3(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_98b2d3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
index 75b6fe8..3c8ab50 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_991ea9(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_991ea9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9944d5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9944d5.wgsl.expected.ir.msl
index 0cde3d8..bac3726 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9944d5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9944d5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_9944d5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9944d5(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9944d5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_9944d5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
index ae1c3b0..610c27a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b10a0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b10a0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
index 1b2536a..daf43ec 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b223b(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b223b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
index fcd5b0d..c92004d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9baf27(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9baf27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl
index 99b214a..46fd5ef 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9c7a00(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9c7a00(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
index e87ea89..34a913e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd4ca(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd4ca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
index 49ef002..217cf7f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_9cd8ad(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd8ad(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd8ad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_9cd8ad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
index 9c75e53..7081902 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d0bac(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d0bac(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl
index 248e0f2..48f0d6d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d68b8(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d68b8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
index 40f97ff..b6ba728 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9dc27a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9dc27a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
index f3ed7c5..2ff9a12 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9e0794(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9e0794(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
index 2a17e7c..c29d32b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9fcc3b(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9fcc3b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl
index 67fb339..c8dc251 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_a105a5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a105a5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a105a5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a105a5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl
index d5e7fb8..edfe9af 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_a14386(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a14386(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a14386(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a14386(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
index 00bf709..9576f27 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a1598a(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a1598a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
index 3299d92..58a928a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_a20ba2(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a20ba2(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a20ba2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a20ba2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
index 8dd142b..83d33b3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a25d9b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a25d9b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
index bf03abb..0ba713b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a2ba5e(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a2ba5e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
index 4b8bf08..4e72a44 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a3ea91(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a3ea91(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
index 278aff9..980142b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a48049(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a48049(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
index a95d568..2d37ee3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a4cd56(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a4cd56(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
index 602e12e..f84a010 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a65776(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a65776(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a7ae4c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a7ae4c.wgsl.expected.ir.msl
index 4dae4aa..8f39845 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a7ae4c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a7ae4c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_a7ae4c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a7ae4c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a7ae4c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a7ae4c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
index b379488..b5f0af5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_aa4353(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aa4353(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aa4353(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_aa4353(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl
index 5afb342..4fad855 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aac604(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aac604(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl
index 36db987..3913658 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_ad7d3b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ad7d3b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ad7d3b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ad7d3b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl
index d3942ab..032a549 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_ae4595(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae4595(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae4595(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ae4595(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ae75a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ae75a7.wgsl.expected.ir.msl
index efaa465..7f46647 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ae75a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ae75a7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_ae75a7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae75a7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae75a7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ae75a7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
index 96f184d..bbda3dc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_af46ab(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_af46ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_af46ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_af46ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl
index ba6133b..c62fef1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b16352(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b16352(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b16352(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b16352(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl
index aabfcb7..cac21d2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b284b8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b284b8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b284b8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b284b8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl
index 6898774..50cb022 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b3ab5e(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b3ab5e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b46d97.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b46d97.wgsl.expected.ir.msl
index 30451cb..895683b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b46d97.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b46d97.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b46d97(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b46d97(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b51345.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b51345.wgsl.expected.ir.msl
index d0167b5..bab5c24 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b51345.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b51345.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_b51345(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b51345(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b51345(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b51345(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl
index 17b597f..59b27d3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b56112(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b56112(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.ir.msl
index b0d6cee..a941f84 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5ba03(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5ba03(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl
index 49587af..266d4d4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b5d68e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5d68e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5d68e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b5d68e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl
index 79311e6..6a2a34e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b6bbf4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b6bbf4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl
index d0dc83e..4267d89 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b8287f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b8287f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b8287f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b8287f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.ir.msl
index ea5c346..9df79e3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b9e7ef(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b9e7ef(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl
index 6720aca..b5ae247 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bb95d9(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bb95d9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl
index 5a56fd0..848bc4e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_bbe285(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bbe285(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bbe285(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_bbe285(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl
index b5c1f1d..5dfb71b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_bc96f6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bc96f6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bc96f6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_bc96f6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl
index effbebd..f438c97 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bd94c8(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bd94c8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl
index 5e91845..a7a8670 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bec716(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bec716(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl
index 5f67788..ffddf64 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bf9170(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bf9170(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl
index 038f59d..aad7c5e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1189e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1189e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl
index 9f58cbc..b8a5a97 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_c1dbf6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1dbf6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1dbf6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c1dbf6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c27466.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c27466.wgsl.expected.ir.msl
index f60a1ca..2632169 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c27466.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c27466.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_c27466(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c27466(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c27466(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c27466(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl
index 47ae448..6a5eefe 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device uint2* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c2cdd3(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c2cdd3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl
index 014db85..089dc08 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_c44fc1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c44fc1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c44fc1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c44fc1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl
index f9f70f3..743f634 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c5a36e(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c5a36e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl
index b773a71..fbdaddb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_c6b44c(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b44c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b44c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c6b44c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c6b985.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c6b985.wgsl.expected.ir.msl
index dadc635..344632d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c6b985.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c6b985.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_c6b985(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b985(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b985(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c6b985(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c7ea63.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c7ea63.wgsl.expected.ir.msl
index 2e32d73..3dc9b52 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c7ea63.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c7ea63.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_c7ea63(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c7ea63(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c7ea63(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c7ea63(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl
index 0795d5e..71e20ed 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_c82420(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c82420(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c82420(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c82420(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl
index 49287f0..7a0b355 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c871f3(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c871f3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl
index 2b6a7bf..8d4236e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_ca10cc(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ca10cc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ca10cc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ca10cc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl
index 60d4dac..a36c42f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_cad3b7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cad3b7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cad3b7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_cad3b7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl
index 177d677..21c318d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_cc947b(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cc947b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cc947b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_cc947b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl
index 074e709..890f6a0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cd3033(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cd3033(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl
index 83237be..eabc376 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.msl
@@ -30,10 +30,10 @@
 };
 
 struct tint_module_vars_struct {
+  device uint2* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
-  device uint2* prevent_dce;
 };
 
 struct VertexOutput {
@@ -51,13 +51,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureDimensions_cdc6c9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureDimensions_cdc6c9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.ir.msl
index 05eb342..9986798 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cedabd(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cedabd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl
index 1cd26a2..c0e823f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cf2b50(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cf2b50(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl
index 032f259..e9c8ce8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d0778e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d0778e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d08a94.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d08a94.wgsl.expected.ir.msl
index 841cf97..2722780 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d08a94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d08a94.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_d08a94(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d08a94(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d08a94(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d08a94(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl
index 04ae53b..5c65808 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_d1b882(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d1b882(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d1b882(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d1b882(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl
index 0145778..e8063ab 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d3accd(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d3accd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl
index 0de998e..af8b77f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44ac3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44ac3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl
index 8bdff0c..733c713 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44dd1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44dd1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl
index ccaf2ee..ee1d879 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_d63c28(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d63c28(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d63c28(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d63c28(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl
index d267242..3b2e576 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d6f3cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d6f3cf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl
index d4b24fb..8c7338c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_d8ba68(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8ba68(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8ba68(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d8ba68(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl
index 123280a..91f786a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_d8f887(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8f887(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8f887(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d8f887(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/da30d2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/da30d2.wgsl.expected.ir.msl
index d808108..a7a6239 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/da30d2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/da30d2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_da30d2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_da30d2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_da30d2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_da30d2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl
index 7c16062..189fbf4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_daf0fe(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_daf0fe(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl
index 6a3dc3b..ce4b800 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_db7131(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_db7131(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl
index 771ea37..0f796c6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_dc83ce(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dc83ce(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dc83ce(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_dc83ce(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.ir.msl
index 6eb80eb..ab49fd5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_de03c6(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_de03c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl
index da3b632..2d61c1f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_deb3c0(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_deb3c0(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_deb3c0(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_deb3c0(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl
index 86eeb37..8f9bd34 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_dee461(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dee461(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dee461(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_dee461(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl
index 0532864..f66cddf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dfdc32(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dfdc32(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e122fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e122fe.wgsl.expected.ir.msl
index 9b5e1c8..36d99a7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e122fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e122fe.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_e122fe(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e122fe(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e122fe(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e122fe(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl
index 74d6c32..ac42e3d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e18a8b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e18a8b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl
index 74c4ad6..4e69fa2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4bfd2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4bfd2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl
index be2d7ca..ade0db8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4e310(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4e310(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl
index 4fd95c9..089db84 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_e4f021(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4f021(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4f021(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e4f021(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl
index 5252185..1bf6d8f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_e50eb8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e50eb8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e50eb8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e50eb8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl
index f28dd15..28977bf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e5a203(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e5a203(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl
index 1d31264..9a29048 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_e738f4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e738f4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e738f4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e738f4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl
index f807081..16d0da3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_e824b6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e824b6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e824b6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e824b6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl
index 96bcd70..96a8e48 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_e99308(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e99308(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e99308(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e99308(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ea066c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ea066c.wgsl.expected.ir.msl
index dc74eed..5844403 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ea066c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ea066c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_ea066c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea066c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea066c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ea066c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ea25bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ea25bc.wgsl.expected.ir.msl
index 49e4ebc..2cc3ce0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ea25bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ea25bc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_ea25bc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea25bc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea25bc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ea25bc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl
index eb6a67f..6078c67 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eafe19(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eafe19(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl
index 2fd99a6..3fce652 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_eb03b1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb03b1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb03b1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb03b1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl
index 5ff9bf7..3a560ae 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_eb10d6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb10d6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb10d6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb10d6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb1249.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb1249.wgsl.expected.ir.msl
index 3ad1576..30e145d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb1249.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb1249.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_eb1249(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb1249(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb1249(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb1249(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl
index 1091560..f45c04b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_eb9f4d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb9f4d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb9f4d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb9f4d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl
index 7418616..7873284 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_ed1030(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ed1030(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ed1030(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ed1030(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl
index d7c4512..db7673a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_ef2e58(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ef2e58(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ef2e58(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ef2e58(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f17acd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f17acd.wgsl.expected.ir.msl
index 9777b9a..ba0aae9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f17acd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f17acd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f17acd(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f17acd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f264a3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f264a3.wgsl.expected.ir.msl
index 2ca4970..8c15f8a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f264a3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f264a3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_f264a3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f264a3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f264a3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f264a3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl
index c47232e..38a9be2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_f3a2ac(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f3a2ac(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f3a2ac(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f3a2ac(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f406ff.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f406ff.wgsl.expected.ir.msl
index d30fc12..903ee9e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f406ff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f406ff.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_f406ff(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f406ff(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f406ff(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f406ff(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl
index ba6f2ed..cad5dbb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4321c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4321c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl
index 10addfd..26ece38 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f48886(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f48886(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl
index c343cee..ce02a56 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_f4e469(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4e469(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4e469(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f4e469(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl
index 1308242..38441f5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_f55a94(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f55a94(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f55a94(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f55a94(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl
index 24c785b..314b506 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f626b3(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f626b3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl
index 02a59cf..ad5bf6e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f7bac5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f7bac5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl
index 88cee53..01325df 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f8522e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f8522e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl
index 78aa098..af1cde5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_f93ece(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f93ece(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f93ece(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f93ece(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl
index 169f7c1..6ad8bf1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_f94e55(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f94e55(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f94e55(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f94e55(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl
index 6625efb..a841b86 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_fbb15a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fbb15a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fbb15a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_fbb15a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fdbae8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/fdbae8.wgsl.expected.ir.msl
index e615c24..2f0479c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/fdbae8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/fdbae8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdbae8(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdbae8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl
index 1667bfd..d7af502 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdf6e9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdf6e9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.ir.msl
index e2c3f73..18bc4f1 100644
--- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_0166ec(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_0166ec(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.ir.msl
index f0e679a..29d3019 100644
--- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_04fa78(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_04fa78(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.ir.msl
index 970b543..0d4996e 100644
--- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_10c554(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_10c554(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.ir.msl
index f430ca0..fb3f3aa 100644
--- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_11b2db(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_11b2db(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.ir.msl
index deec248..fcf4d98 100644
--- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_17baac(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_17baac(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.ir.msl
index 9598c51..dd8764e 100644
--- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_1bf0ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_1bf0ab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.ir.msl
index d7672bf..b48d67f 100644
--- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_1f7f6b(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_1f7f6b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.ir.msl
index d8750c9..aac3332 100644
--- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_22e930(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_22e930(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.ir.msl
index 1c727db..028c335 100644
--- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_238ec4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_238ec4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.ir.msl
index deb1a42..2699328 100644
--- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_24b0bd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_24b0bd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.ir.msl
index b44af6b..ef0dc7e 100644
--- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_269250(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_269250(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.ir.msl
index 535ef4c..594e98a 100644
--- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2a4f40(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2a4f40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.ir.msl
index bc5d243..f2a6e1d 100644
--- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_2cc066(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_2cc066(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.ir.msl
index 18ea305..39ddebe 100644
--- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2e0ed5(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2e0ed5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.ir.msl
index 636dba7..945548b 100644
--- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_32c4e8(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_32c4e8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.ir.msl
index 5501137..4dc4861 100644
--- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_3b32cc(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_3b32cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.ir.msl
index 8a47dc1..90f27fd 100644
--- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_43025d(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_43025d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.ir.msl
index 7e05b81..e3f3fc2 100644
--- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_445793(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_445793(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.ir.msl
index 7cffc46..fa3aefc 100644
--- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_49b07f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_49b07f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.ir.msl
index 636a947..2298816 100644
--- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4b8103(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4b8103(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.ir.msl
index 5f0c30f..73e6f6c 100644
--- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4e8ac5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4e8ac5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.ir.msl
index 56c0c7d..cdeaebc 100644
--- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5266da(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5266da(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.ir.msl
index 5d619d6..1c52048 100644
--- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_59372a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_59372a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.ir.msl
index 2042e0e..245dde7 100644
--- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5ba85f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5ba85f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.ir.msl
index 9f77df2..3f5eec5 100644
--- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5bd491(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5bd491(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.ir.msl
index b137894..237aec0 100644
--- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_6b7b74(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_6b7b74(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.ir.msl
index 5ec6cdb..f8a20b6 100644
--- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_751f8a(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_751f8a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.ir.msl
index 31ff2b0..0cf9c0d 100644
--- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_788010(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_788010(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.ir.msl
index 7bed680..32ac493 100644
--- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_7c3828(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_7c3828(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.ir.msl
index 5bcfd72..8d3345d 100644
--- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_7dd226(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_7dd226(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.ir.msl
index c58d1f0..ef85a1d 100644
--- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_829357(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_829357(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.ir.msl
index 409d276..0fbc4a2 100644
--- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_831549(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_831549(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.ir.msl
index e6e27a7..065b2ce 100644
--- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8578bc(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8578bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.ir.msl
index 0bf3cc8..6697501 100644
--- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_89680f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_89680f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.ir.msl
index 7f64507..d26eb67 100644
--- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8b754c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8b754c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.ir.msl
index 02ebe5a..c92a58c 100644
--- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8fae00(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8fae00(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.ir.msl
index bc4455d..acac446 100644
--- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_92ea47(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_92ea47(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.ir.msl
index b6939e6..6c71e96 100644
--- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_986700(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_986700(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.ir.msl
index 7b015a2..5f4988d 100644
--- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_9a6358(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_9a6358(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.ir.msl
index 284ea83..899c136 100644
--- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_9ab41e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_9ab41e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.ir.msl
index abe6f6e..d511997 100644
--- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_a0372b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_a0372b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.ir.msl
index a4c8675..c243f4d 100644
--- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_a68027(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_a68027(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.ir.msl
index f51ae66..055e284 100644
--- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_aaf6bd(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_aaf6bd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.ir.msl
index 1280489..d310426 100644
--- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_af55b3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_af55b3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.ir.msl
index a6665c7..d059385 100644
--- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bb3ac5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bb3ac5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.ir.msl
index 5375c2b..b1c62c6 100644
--- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bd33b6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bd33b6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.ir.msl
index acbcef1..624244b 100644
--- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_be276f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_be276f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.ir.msl
index 6761d37..6dcd33a 100644
--- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_c0640c(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_c0640c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.ir.msl
index 4c34d4d..2353ea9 100644
--- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ccadde(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ccadde(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.ir.msl
index 13c86e0..8acbb12 100644
--- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ce5578(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ce5578(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.ir.msl
index 2d0d50c..3a6b6ed 100644
--- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_cf9112(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_cf9112(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.ir.msl
index c0d35bf..1bab229 100644
--- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d1f187(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d1f187(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.ir.msl
index 732824d..5a37b1d 100644
--- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d4b5c6(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d4b5c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.ir.msl
index 74a73b9..4d1cd22 100644
--- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d6507c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d6507c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.ir.msl
index a4b0c12..1cb861d 100644
--- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d8e958(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d8e958(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.ir.msl
index 7a3a1c6..7e98f14 100644
--- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_d90605(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_d90605(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.ir.msl
index 6574250..7b8ce61 100644
--- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d98d59(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d98d59(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.ir.msl
index a1bc46f..61e3a01 100644
--- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_dc6661(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_dc6661(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.ir.msl
index 74db692..566521b 100644
--- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e2acac(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e2acac(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.ir.msl
index 2c2a277..39bd5ed 100644
--- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e3165f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e3165f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.ir.msl
index 73695fd..7c28b6c 100644
--- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e9d390(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e9d390(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.ir.msl
index 5dc9eef..80213e4 100644
--- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ea8eb4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ea8eb4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.ir.msl
index 3f4452b..8c534b6 100644
--- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_f2c6e3(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_f2c6e3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.ir.msl
index 8bb4abf..879b6ab 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_144a9a(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_144a9a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.ir.msl
index af6f61d..d8c5987 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_182fd4(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_182fd4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.ir.msl
index cbab0e8..ba2fd85 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_2e409c(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_2e409c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.ir.msl
index ba7efdd..dfa97fa 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_313add(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_313add(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
index 3c07c2b..eac614b 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_60d2d1(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_60d2d1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.ir.msl
index b7a8c2a..4671fdf 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_6d9352(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_6d9352(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.ir.msl
index 936ac59..be5b3dd 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_783e65(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_783e65(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.ir.msl
index a50713f..5d4ec5f 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_b5bc43(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_b5bc43(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.ir.msl
index 3b2af0a..e19bff1 100644
--- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_f585cc(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_f585cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/012e11.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/012e11.wgsl.expected.ir.msl
index 1378064..d5764b9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/012e11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/012e11.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_012e11(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_012e11(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_012e11(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_012e11(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.ir.msl
index bcc8f89..43a907c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_019da0(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_019da0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/01cd01.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/01cd01.wgsl.expected.ir.msl
index eb846de..8da10e0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/01cd01.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/01cd01.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_01cd01(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_01cd01(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_01cd01(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_01cd01(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.ir.msl
index 4ceca36..40b0283 100644
--- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_026217(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_026217(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/02c48d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/02c48d.wgsl.expected.ir.msl
index bbc0879..6ccbec3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/02c48d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/02c48d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_02c48d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02c48d(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02c48d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_02c48d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/02ef1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/02ef1f.wgsl.expected.ir.msl
index 666cfe5..85e46d6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/02ef1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/02ef1f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_02ef1f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02ef1f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02ef1f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_02ef1f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/03e03e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/03e03e.wgsl.expected.ir.msl
index 43e3679..0082d5a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/03e03e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/03e03e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_03e03e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_03e03e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_03e03e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_03e03e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.ir.msl
index acf9d7c..b5b5138 100644
--- a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_045ec9(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_045ec9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.msl
index efc20ad..6cfa062 100644
--- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_04b911(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_04b911(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.ir.msl
index c878a93..c68a5c1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_050c33(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_050c33(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/054350.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/054350.wgsl.expected.ir.msl
index 239720e..0d7a776 100644
--- a/test/tint/builtins/gen/literal/textureLoad/054350.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/054350.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_054350(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_054350(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_054350(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_054350(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.ir.msl
index 75f205c..6002d1a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0674b1(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0674b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.ir.msl
index 565da46..d4c33a6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_06ac37(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_06ac37(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.ir.msl
index 8b37f9c..2826426 100644
--- a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_072e26(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_072e26(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.ir.msl
index 3dd51fd..03b6cb2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_078bc4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_078bc4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/0b515a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/0b515a.wgsl.expected.ir.msl
index 98a5bc2..cdb212e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/0b515a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/0b515a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_0b515a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0b515a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0b515a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_0b515a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.ir.msl
index d47effc..32efce5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0cb698(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0cb698(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.ir.msl
index ad1cdbf..9ec6a66 100644
--- a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_10db82(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_10db82(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/126466.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/126466.wgsl.expected.ir.msl
index 7e5e597..9521487 100644
--- a/test/tint/builtins/gen/literal/textureLoad/126466.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/126466.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_126466(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_126466(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_126466(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_126466(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.ir.msl
index 41ffe0c..1c3feeb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_127e12(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_127e12(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1373dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1373dc.wgsl.expected.ir.msl
index a54475d..5f73785 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1373dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1373dc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1373dc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1373dc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.ir.msl
index 2583fdf..61568ea 100644
--- a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13d539(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13d539(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.ir.msl
index 117706e..9b38829 100644
--- a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13e90c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13e90c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.ir.msl
index 8a537c4..facdca5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_143d84(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_143d84(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.ir.msl
index 8ee1acb..1f731c2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1471b8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1471b8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/14cc4c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/14cc4c.wgsl.expected.ir.msl
index 0bb9f99..de724c7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/14cc4c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/14cc4c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_14cc4c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_14cc4c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_14cc4c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_14cc4c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.ir.msl
index e673026..238c4ac 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1561a7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1561a7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.ir.msl
index 5c4c352..6485181 100644
--- a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_15e675(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_15e675(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1619bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1619bf.wgsl.expected.ir.msl
index b39e9a3..d21305e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1619bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1619bf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_1619bf(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1619bf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1619bf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1619bf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.ir.msl
index 58ab7b1..3380b1a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_168dc8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_168dc8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/170593.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/170593.wgsl.expected.ir.msl
index 3c4bf2b..9705c49 100644
--- a/test/tint/builtins/gen/literal/textureLoad/170593.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/170593.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_170593(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_170593(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_170593(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_170593(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/17095b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/17095b.wgsl.expected.ir.msl
index 4809134..8cc46ba 100644
--- a/test/tint/builtins/gen/literal/textureLoad/17095b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/17095b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_17095b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_17095b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_17095b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_17095b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.ir.msl
index 1b35be6..28d4c61 100644
--- a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_18ac11(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_18ac11(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.msl
index b150bab..9bacfb2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19cf87(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19cf87(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/19d6be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/19d6be.wgsl.expected.ir.msl
index ff2ddf3..c8b1837 100644
--- a/test/tint/builtins/gen/literal/textureLoad/19d6be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/19d6be.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_19d6be(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19d6be(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19d6be(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_19d6be(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/19e5ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/19e5ca.wgsl.expected.ir.msl
index d721952..413a544 100644
--- a/test/tint/builtins/gen/literal/textureLoad/19e5ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/19e5ca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19e5ca(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19e5ca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.ir.msl
index 7b831b3..da37a3e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a062f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a062f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.ir.msl
index d5c67f1..935e400 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a8452(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a8452(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.ir.msl
index d39b061..cc5eded 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1aa950(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1aa950(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.ir.msl
index bfeee02..b6978a7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b051f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b051f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b4332.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1b4332.wgsl.expected.ir.msl
index cfb7e1c..8d5abcb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1b4332.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1b4332.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_1b4332(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b4332(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b4332(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1b4332(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b8588.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1b8588.wgsl.expected.ir.msl
index 53bdb03..ee13234 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1b8588.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1b8588.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b8588(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b8588(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bc5ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1bc5ab.wgsl.expected.ir.msl
index cd2933e..3427574 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bc5ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bc5ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_1bc5ab(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1bc5ab(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1bc5ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1bc5ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
index 7499ad9..007a3b5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
@@ -30,10 +30,10 @@
 };
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -83,13 +83,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_1bfdfb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_1bfdfb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.ir.msl
index f1f2851..c2e44e7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1c562a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1c562a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1d43ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1d43ae.wgsl.expected.ir.msl
index 0c87e34..6141bcc 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1d43ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1d43ae.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_1d43ae(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1d43ae(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1d43ae(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1d43ae(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1e6baa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1e6baa.wgsl.expected.ir.msl
index 1ff973d..688e6a6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1e6baa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1e6baa.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_1e6baa(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1e6baa(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1e6baa(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1e6baa(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.ir.msl
index 993209a..44dcc2d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1eb93f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1eb93f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.ir.msl
index 9b79056..236d6f3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1f2016(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1f2016(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/1fde63.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1fde63.wgsl.expected.ir.msl
index 28e9919..192b10e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1fde63.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1fde63.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_1fde63(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1fde63(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1fde63(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1fde63(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.ir.msl
index 7808ccd..7b3f4b7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_206a08(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_206a08(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.ir.msl
index 8e61bee..5f86a03 100644
--- a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_20fa2f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_20fa2f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/216c37.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/216c37.wgsl.expected.ir.msl
index 2c0948b..dc75e27 100644
--- a/test/tint/builtins/gen/literal/textureLoad/216c37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/216c37.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_216c37(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_216c37(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.ir.msl
index f82a997..3f0e1e1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_21d1c4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_21d1c4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.ir.msl
index 12cc8b0..a56d79c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_223246(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_223246(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.ir.msl
index e1f094c..4fb6cdb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_22e963(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_22e963(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.ir.msl
index d6388d9..4e90e3d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23007a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23007a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.ir.msl
index 48fc599..5fb8f6d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2363be(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2363be(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.ir.msl
index 08b23a0..8790a06 100644
--- a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23ff89(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23ff89(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/25b67f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/25b67f.wgsl.expected.ir.msl
index d9654a2..1f8f0d5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/25b67f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/25b67f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_25b67f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_25b67f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_25b67f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_25b67f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26b8f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/26b8f6.wgsl.expected.ir.msl
index ba6134e..4aefb2d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/26b8f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/26b8f6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_26b8f6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26b8f6(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26b8f6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_26b8f6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.msl
index 4551edc..351ed9d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26c4f8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26c4f8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.ir.msl
index 51c34b9..693a2b9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26d7f1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26d7f1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/272e7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/272e7a.wgsl.expected.ir.msl
index 40ed3c2..92a92f9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/272e7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/272e7a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_272e7a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_272e7a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_272e7a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_272e7a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/276643.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/276643.wgsl.expected.ir.msl
index 645f133..00ddaf3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/276643.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/276643.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276643(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276643(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.ir.msl
index 133c1ff..1bdf6bc 100644
--- a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276a2c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276a2c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.ir.msl
index 2437c11..a4f6742 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2887d7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2887d7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.ir.msl
index ddbcec2..7306d17 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2a82d9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2a82d9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.ir.msl
index 110dc49..ba1e839 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2ae485(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2ae485(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.ir.msl
index 1ac19ec..f5b7c25 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2c72ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2c72ae(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2cee30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2cee30.wgsl.expected.ir.msl
index d9cc087..1f10a53 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2cee30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2cee30.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_2cee30(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2cee30(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2cee30(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_2cee30(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.ir.msl
index 282dca9..8395279 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d479c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d479c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.ir.msl
index a0e87c4..ade4dcb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d6cf7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d6cf7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2dbfc2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2dbfc2.wgsl.expected.ir.msl
index ca4538e..01b4185 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2dbfc2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2dbfc2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_2dbfc2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2dbfc2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2dbfc2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_2dbfc2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.ir.msl
index d76d27d..688449e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e09aa(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e09aa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.ir.msl
index 76514b4..691780f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e3552(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e3552(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/2eaf31.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/2eaf31.wgsl.expected.ir.msl
index d250cbe..234fc63 100644
--- a/test/tint/builtins/gen/literal/textureLoad/2eaf31.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/2eaf31.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_2eaf31(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2eaf31(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2eaf31(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_2eaf31(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.ir.msl
index 8958beb..aa55159 100644
--- a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_313c73(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_313c73(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.ir.msl
index 758dfc7..c72bfca 100644
--- a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_31db4b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_31db4b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.ir.msl
index d3c9090..43d8f27 100644
--- a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_321210(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_321210(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/32a7b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/32a7b8.wgsl.expected.ir.msl
index ef7cdd2..78d247e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/32a7b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/32a7b8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_32a7b8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_32a7b8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_32a7b8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_32a7b8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.ir.msl
index e8dbf86..ae2cc91 100644
--- a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_33d3aa(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_33d3aa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.ir.msl
index 6b263cf..6b0fe5b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_348827(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_348827(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/34d97c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/34d97c.wgsl.expected.ir.msl
index 7fe95d1..000e52b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/34d97c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/34d97c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_34d97c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_34d97c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_34d97c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_34d97c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/35a5e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/35a5e2.wgsl.expected.ir.msl
index 73713d3..bfd9708 100644
--- a/test/tint/builtins/gen/literal/textureLoad/35a5e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/35a5e2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_35a5e2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35a5e2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35a5e2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_35a5e2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/35d464.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/35d464.wgsl.expected.ir.msl
index fe07513..b9870f1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/35d464.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/35d464.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35d464(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35d464(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.ir.msl
index 7c5ccb9..da7e0e0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_374351(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_374351(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.ir.msl
index a3614e8..f0ca9eb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_388688(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_388688(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.ir.msl
index 0de1276..b41babf 100644
--- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_38f8ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_38f8ab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/39016c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/39016c.wgsl.expected.ir.msl
index a925676..aff3d10 100644
--- a/test/tint/builtins/gen/literal/textureLoad/39016c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/39016c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_39016c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39016c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39016c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_39016c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/395447.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/395447.wgsl.expected.ir.msl
index 1d5bd60..c1d094e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/395447.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/395447.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_395447(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_395447(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_395447(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_395447(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.ir.msl
index c2c9506..b9093b1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39ef40(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39ef40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3a2350.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3a2350.wgsl.expected.ir.msl
index 024eeb2..f115042 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3a2350.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3a2350.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_3a2350(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3a2350(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3a2350(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3a2350(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3aea13.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3aea13.wgsl.expected.ir.msl
index 5934b30..5fb1d77 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3aea13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3aea13.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_3aea13(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3aea13(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3aea13(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3aea13(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3bbc2b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3bbc2b.wgsl.expected.ir.msl
index e084e15..81fed00 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3bbc2b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3bbc2b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_3bbc2b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3bbc2b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3bbc2b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3bbc2b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.ir.msl
index 0ba1429..2cc0102 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c0d9e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c0d9e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.ir.msl
index 962b5a0..8f8c1df 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c9587(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c9587(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.ir.msl
index 7804176..d00e2e8 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c96e8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c96e8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3cfb9c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3cfb9c.wgsl.expected.ir.msl
index 6ef79f7..ca2e445 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3cfb9c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3cfb9c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_3cfb9c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3cfb9c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3cfb9c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3cfb9c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.ir.msl
index 184dd60..e177bf2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d001b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d001b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.ir.msl
index 19bfc09..8373c84 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d3fd1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d3fd1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.ir.msl
index dce8cde..c80b979 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d9c90(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d9c90(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3da3ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3da3ed.wgsl.expected.ir.msl
index 48d3a79..c79bb0e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3da3ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3da3ed.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3da3ed(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3da3ed(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e16a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3e16a8.wgsl.expected.ir.msl
index 2e61a14..e50a761 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3e16a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3e16a8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_3e16a8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e16a8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e16a8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3e16a8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.ir.msl
index 3eb673c..da7fbfd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e5f6a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e5f6a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/40ee8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/40ee8b.wgsl.expected.ir.msl
index e7966a0..781a6f3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/40ee8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/40ee8b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_40ee8b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_40ee8b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_40ee8b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_40ee8b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4212a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4212a1.wgsl.expected.ir.msl
index da07c88..1c672c3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4212a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4212a1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_4212a1(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4212a1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4212a1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4212a1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/424afd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/424afd.wgsl.expected.ir.msl
index 1f3c0e3..ab324e0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/424afd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/424afd.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_424afd(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_424afd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_424afd(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_424afd(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/42a631.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/42a631.wgsl.expected.ir.msl
index bf53bae..db67072 100644
--- a/test/tint/builtins/gen/literal/textureLoad/42a631.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/42a631.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_42a631(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_42a631(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_42a631(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_42a631(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/43484a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/43484a.wgsl.expected.ir.msl
index 898a31d..df77a59 100644
--- a/test/tint/builtins/gen/literal/textureLoad/43484a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/43484a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_43484a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43484a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43484a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_43484a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.ir.msl
index b3bd114..71caeb3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_439e2a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_439e2a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/43cd86.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/43cd86.wgsl.expected.ir.msl
index f4f9b50..7d419b3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/43cd86.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/43cd86.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_43cd86(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43cd86(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43cd86(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_43cd86(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.ir.msl
index 0e8a48b..48a8568 100644
--- a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_44c826(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_44c826(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4542ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4542ae.wgsl.expected.ir.msl
index d642210..5ae4167 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4542ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4542ae.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4542ae(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4542ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4542ae(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4542ae(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.ir.msl
index da0748c..a17a1c6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_454347(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_454347(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.ir.msl
index 7833762..e1f4c8b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4638a0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4638a0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/469912.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/469912.wgsl.expected.ir.msl
index 4834643..1089cbd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/469912.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/469912.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_469912(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_469912(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_469912(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_469912(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.ir.msl
index 3764cd8..c2cb642 100644
--- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46a93f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46a93f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.ir.msl
index e30b042..cf4c54a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46dbf5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46dbf5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/473d3e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/473d3e.wgsl.expected.ir.msl
index a794081..9212a0a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/473d3e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/473d3e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_473d3e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_473d3e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_473d3e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_473d3e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.ir.msl
index 42287be..bcc44aa 100644
--- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_47e818(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_47e818(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/482627.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/482627.wgsl.expected.ir.msl
index f5ea46a..5ec8d6a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/482627.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/482627.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_482627(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_482627(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_482627(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_482627(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.ir.msl
index 8ebd2bb..c81f4ac 100644
--- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_484344(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_484344(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4951bb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4951bb.wgsl.expected.ir.msl
index cf1fd29..e05aff4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4951bb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4951bb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4951bb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4951bb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.ir.msl
index 6e33e44..6b86b89 100644
--- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_49f76f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_49f76f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4a5c55.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4a5c55.wgsl.expected.ir.msl
index d752ba7..b0328c1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4a5c55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4a5c55.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_4a5c55(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4a5c55(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4a5c55(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4a5c55(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.ir.msl
index fc2f290..fad3256 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4acb64(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4acb64(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c15b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4c15b2.wgsl.expected.ir.msl
index 324f14a..486f3a2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4c15b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4c15b2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4c15b2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c15b2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c15b2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4c15b2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c1a1e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4c1a1e.wgsl.expected.ir.msl
index 47a4625..bfbc674 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4c1a1e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4c1a1e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_4c1a1e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c1a1e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c1a1e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4c1a1e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c423f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4c423f.wgsl.expected.ir.msl
index 1684923..db63b15 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4c423f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4c423f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c423f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c423f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.ir.msl
index f294e7f..d06c617 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c67be(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c67be(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4ccf9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4ccf9a.wgsl.expected.ir.msl
index 248898a..dd63d79 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4ccf9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4ccf9a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_4ccf9a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4ccf9a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4ccf9a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4ccf9a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.ir.msl
index bc4ad20..2436816 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4cdca5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4cdca5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.msl
index e9788a4..6f61365 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4db25c(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4db25c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4e2c5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4e2c5c.wgsl.expected.ir.msl
index 1619f51..f352380 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4e2c5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4e2c5c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4e2c5c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4e2c5c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4e2c5c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4e2c5c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4f5496.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4f5496.wgsl.expected.ir.msl
index f066f17..78606c1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4f5496.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4f5496.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_4f5496(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f5496(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f5496(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4f5496(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4f90bb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4f90bb.wgsl.expected.ir.msl
index 2246d7f..3c05ec2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4f90bb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4f90bb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4f90bb(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f90bb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f90bb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4f90bb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.ir.msl
index 626facc..51d6c70 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fa6ae(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fa6ae(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.ir.msl
index 38b3a49..fb74c14 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fd803(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fd803(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.ir.msl
index fad3278..598d9db 100644
--- a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_505aa2(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_505aa2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.ir.msl
index 26de852..fa819dd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_50915c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_50915c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5154e1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5154e1.wgsl.expected.ir.msl
index 6112ef9..6e9dcaa 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5154e1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5154e1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_5154e1(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5154e1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5154e1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5154e1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.ir.msl
index 366fad4..946afde 100644
--- a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_519ab5(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_519ab5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.ir.msl
index 1bf8bd9..a1dd233 100644
--- a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53378a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53378a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/53941c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/53941c.wgsl.expected.ir.msl
index 48ab65d..f642a8f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/53941c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/53941c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_53941c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53941c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53941c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_53941c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.ir.msl
index 6102deb..63cabcf 100644
--- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53e142(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53e142(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.ir.msl
index 8320467..1f50628 100644
--- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54a59b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54a59b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.ir.msl
index 5b6a57e..8c5587e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54e0ce(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54e0ce(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/54fb38.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/54fb38.wgsl.expected.ir.msl
index 6eb585e..1c686b7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/54fb38.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/54fb38.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_54fb38(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54fb38(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54fb38(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_54fb38(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.ir.msl
index 92bcc0b..10e23f1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_55e745(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_55e745(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.ir.msl
index 3105e15..687cdd5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_560573(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_560573(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/56a000.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/56a000.wgsl.expected.ir.msl
index e4c13c2..6247d28 100644
--- a/test/tint/builtins/gen/literal/textureLoad/56a000.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/56a000.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_56a000(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_56a000(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_56a000(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_56a000(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.ir.msl
index b556dea..86f5316 100644
--- a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_582015(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_582015(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.ir.msl
index 2f14930..001b1de 100644
--- a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_589eaa(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_589eaa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5a2f9d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5a2f9d.wgsl.expected.ir.msl
index 4713642..fc65086 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5a2f9d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5a2f9d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5a2f9d(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5a2f9d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.ir.msl
index 36dcc57..c37ea75 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5abbf2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5abbf2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5b0f5b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5b0f5b.wgsl.expected.ir.msl
index 729150d..c2a7a69 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5b0f5b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5b0f5b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_5b0f5b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b0f5b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b0f5b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5b0f5b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5b4947.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5b4947.wgsl.expected.ir.msl
index 0e356c4..bb07fdd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5b4947.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5b4947.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_5b4947(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b4947(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b4947(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5b4947(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.ir.msl
index 116f49b..1245b7d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5bb7fb(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5bb7fb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5c69f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5c69f8.wgsl.expected.ir.msl
index 73a4e84..462b630 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5c69f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5c69f8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_5c69f8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5c69f8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5c69f8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5c69f8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cd3fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5cd3fc.wgsl.expected.ir.msl
index 1fdf9f4..ea134da 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5cd3fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5cd3fc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_5cd3fc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cd3fc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cd3fc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5cd3fc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.ir.msl
index a347a93..2ffeb1a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cee3b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cee3b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.ir.msl
index 02cf74e..08ae60f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d0a2f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d0a2f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.ir.msl
index 2627dc4..02c3834 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d4042(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d4042(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5dd4c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5dd4c7.wgsl.expected.ir.msl
index 0535bd1..8af019d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5dd4c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5dd4c7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5dd4c7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5dd4c7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e17a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5e17a7.wgsl.expected.ir.msl
index 3e4a6a6..44f2921 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5e17a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5e17a7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_5e17a7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e17a7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e17a7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5e17a7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e1843.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5e1843.wgsl.expected.ir.msl
index e146943..4f01b64 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5e1843.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5e1843.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_5e1843(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e1843(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e1843(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5e1843(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.ir.msl
index 66570b1..2a7d75b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e8d3f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e8d3f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5ed6ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5ed6ad.wgsl.expected.ir.msl
index 351a996..e946e9b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5ed6ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5ed6ad.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5ed6ad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5ed6ad(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.ir.msl
index 4029531..500e5a5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5f4473(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5f4473(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.ir.msl
index d8d195d..4f1fa03 100644
--- a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5feb4d(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5feb4d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.ir.msl
index 9d91010..24b1b8e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6154d4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6154d4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/61e2e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/61e2e8.wgsl.expected.ir.msl
index 8a7895f..0c8b83a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/61e2e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/61e2e8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_61e2e8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_61e2e8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_61e2e8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_61e2e8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.ir.msl
index 6e302bd..41bf355 100644
--- a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_620caa(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_620caa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/622278.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/622278.wgsl.expected.ir.msl
index 1788a63..3d4a2a9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/622278.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/622278.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_622278(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_622278(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.msl
index 329cd2a..9de9e5b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6273b1(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6273b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.ir.msl
index e7696f1..9264f60 100644
--- a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d125(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d125(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d1de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/62d1de.wgsl.expected.ir.msl
index b961048..673d0b6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/62d1de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/62d1de.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d1de(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d1de(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.ir.msl
index 9b16e25..32f436e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_639962(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_639962(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.ir.msl
index 7c23605..b0e266d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_63be18(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_63be18(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/64c372.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/64c372.wgsl.expected.ir.msl
index c8c9a77..7bbca49 100644
--- a/test/tint/builtins/gen/literal/textureLoad/64c372.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/64c372.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_64c372(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_64c372(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_64c372(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_64c372(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.ir.msl
index ad64f04..203e88c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_656d76(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_656d76(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.ir.msl
index 43a4463..643159e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_65a4d0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_65a4d0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/666010.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/666010.wgsl.expected.ir.msl
index 02f2bf1..01c5d8d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/666010.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/666010.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_666010(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_666010(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_666010(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_666010(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.ir.msl
index 0c3ac70..27f12d1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6678b6(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6678b6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.msl
index ca2fbb9..0feaa27 100644
--- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_66be47(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_66be47(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/67d826.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/67d826.wgsl.expected.ir.msl
index 5a03d0e..8e2f4c9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/67d826.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/67d826.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_67d826(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67d826(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67d826(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_67d826(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.ir.msl
index 687db5c..ad44cff 100644
--- a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67edca(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67edca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/68d273.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/68d273.wgsl.expected.ir.msl
index 5ac46c3..6cf1315 100644
--- a/test/tint/builtins/gen/literal/textureLoad/68d273.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/68d273.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_68d273(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_68d273(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_68d273(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_68d273(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.msl
index 0ca693a..acab1c1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6925bc(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6925bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/69fee5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/69fee5.wgsl.expected.ir.msl
index b978682..515c898 100644
--- a/test/tint/builtins/gen/literal/textureLoad/69fee5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/69fee5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_69fee5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_69fee5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_69fee5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_69fee5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6a6871.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6a6871.wgsl.expected.ir.msl
index 449407b..8c51cf2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6a6871.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6a6871.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6a6871(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6a6871(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6a6871(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6a6871(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6b77d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6b77d4.wgsl.expected.ir.msl
index 1ae85f6..04b5192 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6b77d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6b77d4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b77d4(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b77d4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/6b8ba6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6b8ba6.wgsl.expected.ir.msl
index 182abac..1585f92 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6b8ba6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6b8ba6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6b8ba6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b8ba6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b8ba6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6b8ba6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6ba9ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6ba9ab.wgsl.expected.ir.msl
index 97970fa..fa18670 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6ba9ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6ba9ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6ba9ab(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6ba9ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6ba9ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6ba9ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf3e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6bf3e2.wgsl.expected.ir.msl
index 4bc3ecc..86b5358 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6bf3e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6bf3e2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6bf3e2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf3e2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf3e2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6bf3e2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.ir.msl
index 05676a2..1394842 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf4b7(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf4b7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d1fb4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6d1fb4.wgsl.expected.ir.msl
index 82b6f85..37b3da4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6d1fb4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6d1fb4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_6d1fb4(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d1fb4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d1fb4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6d1fb4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.ir.msl
index e3cc4a4..1d635f9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d376a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d376a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d7bb5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6d7bb5.wgsl.expected.ir.msl
index 89d3b58..a8a9f9a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6d7bb5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6d7bb5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6d7bb5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d7bb5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d7bb5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6d7bb5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6e903f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6e903f.wgsl.expected.ir.msl
index 49555de..2d5d9d5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6e903f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6e903f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_6e903f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6e903f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6e903f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6e903f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f0370.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6f0370.wgsl.expected.ir.msl
index 8ce7d09..fa77bbd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6f0370.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6f0370.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0370(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0370(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f0ea8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6f0ea8.wgsl.expected.ir.msl
index a61314e..7f2a09b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6f0ea8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6f0ea8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6f0ea8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0ea8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0ea8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6f0ea8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.ir.msl
index 90d4e91..30a07c9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f1750(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f1750(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f8927.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/6f8927.wgsl.expected.ir.msl
index 73b3376..7e681c3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6f8927.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/6f8927.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6f8927(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f8927(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f8927(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6f8927(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.ir.msl
index cfc5906..7ca7d49 100644
--- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_714471(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_714471(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.ir.msl
index 9a96d58..2eb2917 100644
--- a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72bb3c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72bb3c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/72c9c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/72c9c3.wgsl.expected.ir.msl
index cacb7be..c2fcdc9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/72c9c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/72c9c3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_72c9c3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72c9c3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72c9c3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_72c9c3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/742f1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/742f1b.wgsl.expected.ir.msl
index 0cd6320..3f95f73 100644
--- a/test/tint/builtins/gen/literal/textureLoad/742f1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/742f1b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_742f1b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_742f1b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_742f1b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_742f1b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.ir.msl
index 3849c97..dc3409b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_749704(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_749704(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/74a387.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/74a387.wgsl.expected.ir.msl
index 3959a4a..26ece70 100644
--- a/test/tint/builtins/gen/literal/textureLoad/74a387.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/74a387.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_74a387(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_74a387(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_74a387(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_74a387(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.ir.msl
index e766ae0..d0f3bcb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_773c46(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_773c46(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.ir.msl
index cacd9f8..c48d457 100644
--- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_789045(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_789045(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.ir.msl
index d470644..1c02718 100644
--- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_79e697(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_79e697(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.ir.msl
index c4e58f4..387dcc8 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7ab4df(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7ab4df(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.msl
index a2ae17c..6dc7e2e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7b63e0(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7b63e0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.ir.msl
index a81cc45..5c0b025 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7bee94(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7bee94(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.ir.msl
index 2157a24..708d910 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7c90e5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7c90e5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.ir.msl
index 69caafc..25714a9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dab57(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dab57(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dd3d5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7dd3d5.wgsl.expected.ir.msl
index 4310a78..3aabe8d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7dd3d5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7dd3d5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_7dd3d5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dd3d5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dd3d5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_7dd3d5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7e5cbc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7e5cbc.wgsl.expected.ir.msl
index 66e99628..fe26df9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7e5cbc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7e5cbc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_7e5cbc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7e5cbc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7e5cbc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_7e5cbc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.msl
index e4e5dd5..e70ba63 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7fd822(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7fd822(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/80dae1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/80dae1.wgsl.expected.ir.msl
index dc59217..ec5ac61 100644
--- a/test/tint/builtins/gen/literal/textureLoad/80dae1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/80dae1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_80dae1(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_80dae1(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_80dae1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_80dae1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/81c381.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/81c381.wgsl.expected.ir.msl
index 4f5c8ea..6f7fdd4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/81c381.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/81c381.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_81c381(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_81c381(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.ir.msl
index a2aa746..40e9745 100644
--- a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83162f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83162f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.ir.msl
index 1c8a045..9779a64 100644
--- a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83cea4(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83cea4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/83d6e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/83d6e3.wgsl.expected.ir.msl
index 1bd4801..8f49775 100644
--- a/test/tint/builtins/gen/literal/textureLoad/83d6e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/83d6e3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_83d6e3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83d6e3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83d6e3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_83d6e3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/848d85.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/848d85.wgsl.expected.ir.msl
index 5a615db..702a673 100644
--- a/test/tint/builtins/gen/literal/textureLoad/848d85.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/848d85.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_848d85(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_848d85(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_848d85(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_848d85(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84a438.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/84a438.wgsl.expected.ir.msl
index b51fe20..b9e9c34 100644
--- a/test/tint/builtins/gen/literal/textureLoad/84a438.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/84a438.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_84a438(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84a438(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84a438(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_84a438(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.ir.msl
index 57fde61..1b0d6eb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84c728(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84c728(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.ir.msl
index 7f8a275..b6a54ff 100644
--- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84dee1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84dee1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.ir.msl
index ef3dc041..f9f23ea 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8527b1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8527b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.ir.msl
index ea43611..6f53889 100644
--- a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_862833(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_862833(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/878e24.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/878e24.wgsl.expected.ir.msl
index f95a52a..2fb4a39 100644
--- a/test/tint/builtins/gen/literal/textureLoad/878e24.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/878e24.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_878e24(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_878e24(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_878e24(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_878e24(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.ir.msl
index a53a5cc..ccefb78 100644
--- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87be85(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87be85(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/87f0a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/87f0a6.wgsl.expected.ir.msl
index c8d8da0..2d54185 100644
--- a/test/tint/builtins/gen/literal/textureLoad/87f0a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/87f0a6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_87f0a6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87f0a6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87f0a6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_87f0a6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/881349.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/881349.wgsl.expected.ir.msl
index 065fe06..85e57ef 100644
--- a/test/tint/builtins/gen/literal/textureLoad/881349.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/881349.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_881349(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_881349(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_881349(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_881349(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.ir.msl
index 7b28b83..65f3124 100644
--- a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_89620b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_89620b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.ir.msl
index d5e791e..6a97821 100644
--- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_897cf3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_897cf3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.ir.msl
index 6f0b663..e39fa5a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a291b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a291b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.ir.msl
index 22fa84a..cd69cf4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a9988(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a9988(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
index 4eae5cf..3409c8d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
@@ -30,10 +30,10 @@
 };
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -84,13 +84,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_8acf41(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_8acf41(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8b62fb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8b62fb.wgsl.expected.ir.msl
index edf5910..3195b61 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8b62fb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8b62fb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_8b62fb(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8b62fb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8b62fb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8b62fb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8bf8c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8bf8c2.wgsl.expected.ir.msl
index fb74d98..7536a43 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8bf8c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8bf8c2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_8bf8c2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8bf8c2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8bf8c2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8bf8c2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8c6176.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8c6176.wgsl.expected.ir.msl
index 5191596..c5db531 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8c6176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8c6176.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_8c6176(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8c6176(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8c6176(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8c6176(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.msl
index 8f63af7..6fef82e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ccbe3(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ccbe3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8d64c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8d64c3.wgsl.expected.ir.msl
index f59656f..166d044 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8d64c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8d64c3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_8d64c3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8d64c3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8d64c3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8d64c3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.ir.msl
index 3d41018..41a65b8 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8db0ce(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8db0ce(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.ir.msl
index 823b402..043866b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e5032(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e5032(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e68c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8e68c9.wgsl.expected.ir.msl
index 058ce6a..87a1d9c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8e68c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8e68c9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_8e68c9(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e68c9(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e68c9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8e68c9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8fc29b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8fc29b.wgsl.expected.ir.msl
index 351bf1a..4591023 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8fc29b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8fc29b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_8fc29b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8fc29b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8fc29b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8fc29b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.ir.msl
index 9dada6d..955f019 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ff033(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ff033(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/91ede5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/91ede5.wgsl.expected.ir.msl
index f092a31..a7a744e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/91ede5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/91ede5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_91ede5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_91ede5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_91ede5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_91ede5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9242e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9242e7.wgsl.expected.ir.msl
index 0aed8cc..340f73b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9242e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9242e7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_9242e7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9242e7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9242e7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_9242e7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/92dd61.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/92dd61.wgsl.expected.ir.msl
index a700574..e8804a5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/92dd61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/92dd61.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_92dd61(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92dd61(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92dd61(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_92dd61(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.ir.msl
index 6fd03d3..900ab55 100644
--- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92eb1f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92eb1f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.ir.msl
index 87d5eb0..dbfbc3e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_936952(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_936952(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/93f23e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/93f23e.wgsl.expected.ir.msl
index 22dd955..ff4508c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/93f23e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/93f23e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_93f23e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_93f23e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_93f23e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_93f23e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/947107.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/947107.wgsl.expected.ir.msl
index 79a2d24..4ba9c34 100644
--- a/test/tint/builtins/gen/literal/textureLoad/947107.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/947107.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_947107(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_947107(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.ir.msl
index 0f1c363..09e298a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_96efd5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_96efd5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.ir.msl
index 9a3d187..82e19dd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_970308(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_970308(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.ir.msl
index dada09e..f731b17 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9885b0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9885b0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/99d8fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/99d8fa.wgsl.expected.ir.msl
index 5e36083..b56040d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/99d8fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/99d8fa.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_99d8fa(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_99d8fa(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_99d8fa(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_99d8fa(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.ir.msl
index d7cb5f7..b10ceda 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a7c90(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a7c90(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.ir.msl
index 8773ac4..03570e3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a8c1e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a8c1e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.ir.msl
index b03ea9a..f7b6262 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9aa733(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9aa733(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.msl
index f0a48a4..560ea62 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b2667(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b2667(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.ir.msl
index 935d901..fe6d274 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b5343(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b5343(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.ir.msl
index b72ed2a..f013974 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2376(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2376(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.ir.msl
index 9f08f67..41daf84 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2a14(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2a14(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.ir.msl
index dc2f22b..84d6cff 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9cf7df(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9cf7df(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.ir.msl
index 5ab66d1..4797d83 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9d70e9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9d70e9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.ir.msl
index 902ac19..3cc9d6c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9de6f5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9de6f5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.msl
index e14d965..67d3615 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9ed19e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9ed19e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fa9fd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9fa9fd.wgsl.expected.ir.msl
index 46d160e..81a7f7f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9fa9fd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9fa9fd.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_9fa9fd(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fa9fd(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fa9fd(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_9fa9fd(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.ir.msl
index 5cb41f4..8129bd6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fbfd9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fbfd9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fd7be.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/9fd7be.wgsl.expected.ir.msl
index 0aa8a6a..447c7ca 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9fd7be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/9fd7be.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_9fd7be(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fd7be(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fd7be(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_9fd7be(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.ir.msl
index 8597ddb..83134f2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a03af1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a03af1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.ir.msl
index a4413aa..bde6dbe 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a24be1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a24be1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a2b3f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a2b3f4.wgsl.expected.ir.msl
index ac8bec1..b84e679 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a2b3f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a2b3f4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a2b3f4(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a2b3f4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a2b3f4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a2b3f4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.ir.msl
index 9276fd1..8dd7dc3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a3733f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3733f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3733f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a3733f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a3f122.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a3f122.wgsl.expected.ir.msl
index 12a29e7..49fe300 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a3f122.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a3f122.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a3f122(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3f122(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3f122(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a3f122(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a548a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a548a8.wgsl.expected.ir.msl
index f134880..2cbecbc 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a548a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a548a8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a548a8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a548a8(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a548a8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a548a8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a54e11.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a54e11.wgsl.expected.ir.msl
index a5991b8..46af265 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a54e11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a54e11.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_a54e11(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a54e11(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a54e11(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a54e11(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.ir.msl
index 56db06e..2486ee99 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a583c9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a583c9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a5c4e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a5c4e2.wgsl.expected.ir.msl
index 46d5076..d1f0023 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a5c4e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a5c4e2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a5c4e2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5c4e2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5c4e2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a5c4e2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a5e0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a5e0a5.wgsl.expected.ir.msl
index 1f7edbd..f795571 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a5e0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a5e0a5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a5e0a5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5e0a5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5e0a5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a5e0a5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a64b1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a64b1d.wgsl.expected.ir.msl
index 84ad88c..e7c1725 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a64b1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a64b1d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a64b1d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a64b1d(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a64b1d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a64b1d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.ir.msl
index 32c0a2e..82599f7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6a85a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6a85a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.ir.msl
index 2f67281..9abf2d3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6b61d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6b61d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.ir.msl
index 29f7fb7..59fa51c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7444c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7444c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.ir.msl
index d3de285..2b79328 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7a3c3(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7a3c3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7bcb4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a7bcb4.wgsl.expected.ir.msl
index f6fa951..db509d4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a7bcb4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a7bcb4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a7bcb4(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7bcb4(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7bcb4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a7bcb4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7c171.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a7c171.wgsl.expected.ir.msl
index 62d4f34..4984a59 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a7c171.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a7c171.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_a7c171(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7c171(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7c171(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a7c171(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.ir.msl
index e83ca50..f6e804b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a8549b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a8549b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/a92b18.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a92b18.wgsl.expected.ir.msl
index 67cc0c6..aa7f6cb 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a92b18.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a92b18.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a92b18(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a92b18(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a92b18(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a92b18(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.ir.msl
index 89ec212..dd5cb49 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a9a9f5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a9a9f5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa2579.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aa2579.wgsl.expected.ir.msl
index ea51439..7e46fc0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aa2579.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aa2579.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_aa2579(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa2579(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa2579(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_aa2579(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa6130.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aa6130.wgsl.expected.ir.msl
index 82b1f1d..ee33959 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aa6130.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aa6130.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_aa6130(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa6130(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa6130(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_aa6130(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.ir.msl
index 39214ea..d5933f0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa8a0d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa8a0d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.ir.msl
index a49823c..55362f6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae7f6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae7f6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae9c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aae9c3.wgsl.expected.ir.msl
index 8be2a89..e49c916 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aae9c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aae9c3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_aae9c3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae9c3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae9c3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_aae9c3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.ir.msl
index 78113ff..749a2c9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ac64f7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ac64f7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/acf22f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/acf22f.wgsl.expected.ir.msl
index 107aeea..b16becc 100644
--- a/test/tint/builtins/gen/literal/textureLoad/acf22f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/acf22f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_acf22f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_acf22f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_acf22f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_acf22f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ad551e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ad551e.wgsl.expected.ir.msl
index 2c05737..7612a08 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ad551e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ad551e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_ad551e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ad551e(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ad551e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ad551e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.ir.msl
index b5abfbc..686809b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aeae73(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aeae73(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.ir.msl
index 78a2341..1b491a7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aebc09(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aebc09(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/af0507.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/af0507.wgsl.expected.ir.msl
index 92a6da6..5f634c4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/af0507.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/af0507.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_af0507(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_af0507(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_af0507(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_af0507(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.ir.msl
index 8cb3cc6..171a080 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1bf79(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1bf79(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1ca35.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b1ca35.wgsl.expected.ir.msl
index 28cc6cd..c801285 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b1ca35.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b1ca35.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_b1ca35(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1ca35(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1ca35(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b1ca35(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.ir.msl
index 87b28f5..f8cd75c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b24d27(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b24d27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b25644.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b25644.wgsl.expected.ir.msl
index 046273b..abfae8b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b25644.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b25644.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_b25644(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b25644(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b25644(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b25644(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b27c33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b27c33.wgsl.expected.ir.msl
index a95864f..37e3790 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b27c33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b27c33.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_b27c33(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b27c33(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b27c33(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b27c33(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.ir.msl
index 2b54e70..2b83f0e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b29f71(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b29f71(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b4d6c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b4d6c4.wgsl.expected.ir.msl
index 09d1dc6..a9830ad 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b4d6c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b4d6c4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_b4d6c4(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b4d6c4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b4d6c4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b4d6c4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.ir.msl
index 5c4d34a..92e12c7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b58c6d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b58c6d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b60a86.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b60a86.wgsl.expected.ir.msl
index 52654a6..bb8e6a5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b60a86.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b60a86.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_b60a86(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60a86(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60a86(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b60a86(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b60db7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b60db7.wgsl.expected.ir.msl
index dd27c09..0160a74 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b60db7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b60db7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_b60db7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60db7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60db7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b60db7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.msl
index 8f33073..63b1c37 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6ba5d(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6ba5d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.ir.msl
index 42e4ec8..9b70b20 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6c458(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6c458(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.ir.msl
index e7ae635..8084e07 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b73f6b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b73f6b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75c8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b75c8f.wgsl.expected.ir.msl
index f492917..16c20e9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b75c8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b75c8f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_b75c8f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75c8f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75c8f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b75c8f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.ir.msl
index 57f3e33..3b9b9ad 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75d4a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75d4a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.ir.msl
index e93ddc2..8755551 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b7f74f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b7f74f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.ir.msl
index ec62d15..a2f7332 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b80e7e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b80e7e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.ir.msl
index 3581cbe..be38426 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b94d15(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b94d15(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ba023a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ba023a.wgsl.expected.ir.msl
index 4be27cc..0387482 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ba023a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ba023a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ba023a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba023a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba023a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ba023a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ba74b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ba74b2.wgsl.expected.ir.msl
index d518a95..b7ce348 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ba74b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ba74b2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ba74b2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba74b2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba74b2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ba74b2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/babdf3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/babdf3.wgsl.expected.ir.msl
index 327c1f2..dcb8fd3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/babdf3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/babdf3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_babdf3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_babdf3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_babdf3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_babdf3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bba04a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bba04a.wgsl.expected.ir.msl
index 909412a..4b9c080 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bba04a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bba04a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_bba04a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bba04a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bba04a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bba04a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bbb762.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bbb762.wgsl.expected.ir.msl
index 8d3d0aa..8297fde 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bbb762.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bbb762.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_bbb762(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bbb762(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bbb762(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bbb762(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.ir.msl
index 36f3a9f..9cca3b9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc3201(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc3201(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc882d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bc882d.wgsl.expected.ir.msl
index 56422e3..9ed865d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bc882d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bc882d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_bc882d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc882d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc882d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bc882d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.ir.msl
index d6cbb80..841f415 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bcbb3c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bcbb3c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/bd990a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bd990a.wgsl.expected.ir.msl
index 0e20a48..d09c4f7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bd990a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bd990a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_bd990a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bd990a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bd990a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bd990a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bdc67a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bdc67a.wgsl.expected.ir.msl
index 620a6dd..e841945 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bdc67a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bdc67a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_bdc67a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bdc67a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bdc67a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bdc67a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.ir.msl
index 1d07312..f389e65 100644
--- a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bfd154(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bfd154(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.ir.msl
index 6f0dcad..58f492d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c02b74(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c02b74(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.ir.msl
index 3afe217..e2d5c41 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c07013(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c07013(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.msl
index 457514f..5026a75 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c16e00(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c16e00(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.ir.msl
index 6f342cc..677cca9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c21b33(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c21b33(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.ir.msl
index 234b746..07f6c68 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2a480(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2a480(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2d09a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c2d09a.wgsl.expected.ir.msl
index c9a05ed..80c97d6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c2d09a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c2d09a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_c2d09a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2d09a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2d09a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c2d09a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.ir.msl
index 92a3cc6..c541675 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c378ee(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c378ee(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.ir.msl
index d2b2ac1..682dd58 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c40dcb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c40dcb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.ir.msl
index 5270570..a75a611 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c456bc(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c456bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.ir.msl
index 0643961..6d1ecd0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5791b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5791b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5c86d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c5c86d.wgsl.expected.ir.msl
index a3ac9bb..01716db 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c5c86d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c5c86d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c5c86d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5c86d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5c86d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c5c86d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.ir.msl
index 523f2cb..54e15ec 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c66b20(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c66b20(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.ir.msl
index b8f095a..c1a9753 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7cbed(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7cbed(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7e313.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c7e313.wgsl.expected.ir.msl
index 1c51b26..32b4107 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c7e313.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c7e313.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_c7e313(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7e313(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7e313(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c7e313(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c80691.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c80691.wgsl.expected.ir.msl
index a0d6f90..d81effd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c80691.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c80691.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c80691(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c80691(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c80691(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c80691(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.ir.msl
index 92f312d..fc9a0fd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c8ed19(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c8ed19(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c98bf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c98bf4.wgsl.expected.ir.msl
index bdf50f5..f874898 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c98bf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c98bf4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_c98bf4(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c98bf4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c98bf4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c98bf4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9b083.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c9b083.wgsl.expected.ir.msl
index 90e01ff..4b1e7be 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c9b083.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c9b083.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c9b083(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9b083(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9b083(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c9b083(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.ir.msl
index 4b95f88..00adeb4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9cc40(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9cc40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9f310.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/c9f310.wgsl.expected.ir.msl
index a8b6c9c..6472b9b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c9f310.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/c9f310.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c9f310(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9f310(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9f310(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c9f310(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cac876.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cac876.wgsl.expected.ir.msl
index 4de423c..5759aec 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cac876.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cac876.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_cac876(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cac876(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cac876(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cac876(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.ir.msl
index 02ce4fd..c291541 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cad5f2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cad5f2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.msl
index d1eef17..46187e6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cb57c2(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cb57c2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdbcf6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cdbcf6.wgsl.expected.ir.msl
index 954199c..fdebb8b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cdbcf6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cdbcf6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_cdbcf6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdbcf6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdbcf6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cdbcf6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdccd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cdccd2.wgsl.expected.ir.msl
index bd4d8d9..b08d387 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cdccd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cdccd2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_cdccd2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdccd2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdccd2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cdccd2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.ir.msl
index 41e7e52..68e144c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdd343(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdd343(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/cddf6b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cddf6b.wgsl.expected.ir.msl
index 38ee468..bbb78dd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cddf6b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cddf6b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_cddf6b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cddf6b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cddf6b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cddf6b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cec477.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cec477.wgsl.expected.ir.msl
index 1f9ea00..27f225b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cec477.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cec477.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_cec477(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cec477(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cec477(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cec477(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cece6c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/cece6c.wgsl.expected.ir.msl
index 40f6f2ea..cb8040a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cece6c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/cece6c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cece6c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cece6c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.ir.msl
index 6e8a483..c547529 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d02afc(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d02afc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d0e351.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d0e351.wgsl.expected.ir.msl
index 02c6743..05484d5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d0e351.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d0e351.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_d0e351(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d0e351(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d0e351(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d0e351(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.ir.msl
index 2dc9225..95c669b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d357bb(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d357bb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d37a08.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d37a08.wgsl.expected.ir.msl
index f29e133..c0e28d3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d37a08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d37a08.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_d37a08(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d37a08(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d37a08(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d37a08(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d3d8fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d3d8fc.wgsl.expected.ir.msl
index 664c71b..7f8d819 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d3d8fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d3d8fc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d3d8fc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d3d8fc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d3d8fc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d3d8fc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d41c72.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d41c72.wgsl.expected.ir.msl
index 450f3d5..c1859a2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d41c72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d41c72.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d41c72(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d41c72(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d41c72(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d41c72(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.ir.msl
index ef2971b..168c826 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d4df19(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d4df19(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.ir.msl
index a264702..b4d3ca0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d5c48d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d5c48d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d72de9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d72de9.wgsl.expected.ir.msl
index 54a5232..67f19e3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d72de9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d72de9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d72de9(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d72de9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d72de9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d72de9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d7996a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d7996a.wgsl.expected.ir.msl
index 1a342e8..67115c0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d7996a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d7996a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d7996a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d7996a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d7996a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d7996a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d79c5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d79c5c.wgsl.expected.ir.msl
index b0cd513..6ed6583 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d79c5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d79c5c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_d79c5c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d79c5c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d79c5c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d79c5c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d80ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d80ff3.wgsl.expected.ir.msl
index 4a42553..6cb0aaa 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d80ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d80ff3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_d80ff3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d80ff3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d80ff3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d80ff3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.ir.msl
index 3aebd52..0e06308 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d81c57(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d81c57(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.ir.msl
index d552fe5..1b1b719 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d85d61(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d85d61(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.ir.msl
index 44625ab..b4ab750 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8617f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8617f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8be5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d8be5a.wgsl.expected.ir.msl
index e3a8a5f..f898f11 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d8be5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d8be5a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d8be5a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8be5a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8be5a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d8be5a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d91f37.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/d91f37.wgsl.expected.ir.msl
index 265e374..e4102d1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/d91f37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/d91f37.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_d91f37(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d91f37(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d91f37(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d91f37(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dab04f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/dab04f.wgsl.expected.ir.msl
index 04ab788..db50e08 100644
--- a/test/tint/builtins/gen/literal/textureLoad/dab04f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/dab04f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_dab04f(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dab04f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dab04f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_dab04f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.ir.msl
index e0f76dd..2a31fb9 100644
--- a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dbd554(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dbd554(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd5859.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/dd5859.wgsl.expected.ir.msl
index ee44d1b..1f77074 100644
--- a/test/tint/builtins/gen/literal/textureLoad/dd5859.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/dd5859.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_dd5859(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd5859(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd5859(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_dd5859(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.ir.msl
index 13ea542..d1d4b01 100644
--- a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd8776(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd8776(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.ir.msl
index 0ac0226..b704af8 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ddeed3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ddeed3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/de5a0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/de5a0e.wgsl.expected.ir.msl
index b647d15..b8a6f5f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/de5a0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/de5a0e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_de5a0e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_de5a0e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_de5a0e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_de5a0e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.ir.msl
index a2ec176..0475691 100644
--- a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dee8e7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dee8e7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/defd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/defd9a.wgsl.expected.ir.msl
index 47c91e5..f7da608 100644
--- a/test/tint/builtins/gen/literal/textureLoad/defd9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/defd9a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_defd9a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_defd9a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_defd9a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_defd9a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.ir.msl
index a52aea1..33fd14b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dfdf3b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dfdf3b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e1c3cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e1c3cf.wgsl.expected.ir.msl
index 674e358..e2680c0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e1c3cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e1c3cf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_e1c3cf(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e1c3cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e1c3cf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e1c3cf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.ir.msl
index bad4403..c2c8e31 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2292f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2292f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2b3a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e2b3a1.wgsl.expected.ir.msl
index 1a4561f..4845ac1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e2b3a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e2b3a1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_e2b3a1(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2b3a1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2b3a1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e2b3a1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2d7da.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e2d7da.wgsl.expected.ir.msl
index 6fd526f..74b70f6 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e2d7da.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e2d7da.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_e2d7da(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2d7da(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2d7da(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e2d7da(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e33285.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e33285.wgsl.expected.ir.msl
index 3567e07..06a5b51 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e33285.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e33285.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_e33285(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e33285(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e33285(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e33285(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.ir.msl
index 8d0a3ce..b6bb6ac 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e35f72(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e35f72(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.ir.msl
index 4c3c2d9..de1c450 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3b08b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3b08b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.ir.msl
index f20050c..8d3d472 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3d2cc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3d2cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e4051a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e4051a.wgsl.expected.ir.msl
index 8f81de5..bc8ed4e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e4051a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e4051a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_e4051a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e4051a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e4051a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e4051a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.ir.msl
index 60bf13f..6fbd7d0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e57e92(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e57e92(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.ir.msl
index feb5623..d2f2e35 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e59fdf(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e59fdf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.ir.msl
index 3e620eb..b430a86 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e65916(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e65916(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.ir.msl
index 214a198..3f8c084 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e893d7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e893d7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.ir.msl
index 1a18445..8e7bb82 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e92dd0(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e92dd0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/e9eb65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/e9eb65.wgsl.expected.ir.msl
index 1ac84c4..0dd3a53 100644
--- a/test/tint/builtins/gen/literal/textureLoad/e9eb65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/e9eb65.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_e9eb65(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e9eb65(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e9eb65(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e9eb65(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.ir.msl
index 11f1a19..97fc700 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ea2abd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ea2abd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.ir.msl
index 8382155..13b7017 100644
--- a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eb573b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eb573b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.ir.msl
index f973bd9..98e1520 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ebfb92(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ebfb92(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.ir.msl
index 56d0398..83181b0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ecc823(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ecc823(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ed55a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ed55a8.wgsl.expected.ir.msl
index 91ddb1a..5287001 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ed55a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ed55a8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ed55a8(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ed55a8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ed55a8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ed55a8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.ir.msl
index 6e5fcbf..883b6da 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ee33c5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ee33c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.ir.msl
index 426f138..18a2cf1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eecf7d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eecf7d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef2ec3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ef2ec3.wgsl.expected.ir.msl
index be36746..6c30d74 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ef2ec3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ef2ec3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ef2ec3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef2ec3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef2ec3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ef2ec3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.ir.msl
index 5ee5036..f210eff 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef5405(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef5405(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.ir.msl
index af33a72..acec7b0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_efa787(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_efa787(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0514a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f0514a.wgsl.expected.ir.msl
index 2af102c..7361e98 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f0514a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f0514a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f0514a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0514a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0514a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f0514a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.ir.msl
index 0f533ad..04bb5a2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f06b69(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f06b69(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.ir.msl
index e7da7a6..ec4943e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0abad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0abad(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f1c549.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f1c549.wgsl.expected.ir.msl
index cb8f16b..7aa8718 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f1c549.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f1c549.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f1c549(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f1c549(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f1c549(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f1c549(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.ir.msl
index d557832..9a8696a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2a7ff(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2a7ff(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2bdd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f2bdd4.wgsl.expected.ir.msl
index 01a5f8a..2bc2560 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f2bdd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f2bdd4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f2bdd4(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2bdd4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2bdd4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f2bdd4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2c311.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f2c311.wgsl.expected.ir.msl
index 8d848a9..b9a09b1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f2c311.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f2c311.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_f2c311(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2c311(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2c311(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f2c311(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.ir.msl
index cda13f9..5b54826 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f348d9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f348d9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.ir.msl
index c886a5f..e239ed4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f35ac7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f35ac7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.ir.msl
index 8e2f867..20a1f4b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f379e2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f379e2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.ir.msl
index 9d757b6..da5a8f0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f56e6f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f56e6f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f5aee2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f5aee2.wgsl.expected.ir.msl
index 614fef8..d25731f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f5aee2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f5aee2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5aee2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5aee2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f5fbc6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f5fbc6.wgsl.expected.ir.msl
index 2b27308..4a3397c 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f5fbc6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f5fbc6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f5fbc6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5fbc6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5fbc6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f5fbc6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.ir.msl
index e410f74..952d88f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f74bd8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f74bd8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f3bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f7f3bc.wgsl.expected.ir.msl
index 8afcfc1..9d0086d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f7f3bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f3bc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f7f3bc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f3bc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f3bc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f7f3bc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.ir.msl
index 497e338..f69bc61 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f936(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f936(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f81792.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f81792.wgsl.expected.ir.msl
index a772865..c5084f0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f81792.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f81792.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f81792(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f81792(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f81792(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f81792(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f82eb2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f82eb2.wgsl.expected.ir.msl
index afec8c3..1b4b974 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f82eb2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f82eb2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f82eb2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f82eb2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f82eb2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f82eb2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.ir.msl
index c0a951f..07c50ef 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f85291(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f85291(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.ir.msl
index 0ff707b..a58a2b7 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f8a2e8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f8a2e8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/f92c2d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f92c2d.wgsl.expected.ir.msl
index e47006c..786f855 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f92c2d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f92c2d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f92c2d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f92c2d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f92c2d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f92c2d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.ir.msl
index 980c929..44105f1 100644
--- a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f9eaaf(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f9eaaf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc47ff.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fc47ff.wgsl.expected.ir.msl
index c94e916..853c8e5 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fc47ff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fc47ff.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_fc47ff(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc47ff(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc47ff(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_fc47ff(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.ir.msl
index c53b384..1f79483 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc6d36(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc6d36(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.msl
index f682ef6..a9e5fdf 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fcd23d(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fcd23d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.ir.msl
index e14645e..01d375d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd6442(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd6442(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd9606.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fd9606.wgsl.expected.ir.msl
index 695d2e7..16fbd74 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fd9606.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fd9606.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_fd9606(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd9606(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd9606(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_fd9606(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.ir.msl
index 28769d6..4d65c81 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fdebd0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fdebd0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.ir.msl
index 5a50786..f4819b4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe0565(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe0565(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.ir.msl
index 1ca2bd2..0d5ad1e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe222a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe222a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe2c1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/fe2c1b.wgsl.expected.ir.msl
index d29a6a6..f886aba 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fe2c1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/fe2c1b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_fe2c1b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe2c1b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe2c1b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_fe2c1b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.ir.msl
index e1deead..10b66be 100644
--- a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_feab99(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_feab99(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.msl
index d8e0a74..04599f8 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ff1119(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ff1119(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/014a3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/014a3b.wgsl.expected.ir.msl
index cf63f98..9c802d7 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/014a3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/014a3b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_014a3b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_014a3b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_014a3b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_014a3b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/071ebc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/071ebc.wgsl.expected.ir.msl
index 977de56..ce54265 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/071ebc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/071ebc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_071ebc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_071ebc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_071ebc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_071ebc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0856ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/0856ae.wgsl.expected.ir.msl
index e87d2a2..24b055d 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/0856ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0856ae.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_0856ae(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0856ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0856ae(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_0856ae(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0ec222.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/0ec222.wgsl.expected.ir.msl
index 3d87d8e..449a841 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/0ec222.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0ec222.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0ec222(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0ec222(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.ir.msl
index 7d4ada3..df7048e 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0fe8dc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0fe8dc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/17ccad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/17ccad.wgsl.expected.ir.msl
index 09d0bcd..2089aba 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/17ccad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/17ccad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_17ccad(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_17ccad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_17ccad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_17ccad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/1f858a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/1f858a.wgsl.expected.ir.msl
index 0a41f36..123cbf6 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/1f858a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/1f858a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_1f858a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_1f858a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_1f858a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_1f858a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/24d572.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/24d572.wgsl.expected.ir.msl
index fdf584d..ac8a24d 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/24d572.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/24d572.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_24d572(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_24d572(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_24d572(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_24d572(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.ir.msl
index d554d7f..8d950ff 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_26c9f9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_26c9f9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2a48dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/2a48dc.wgsl.expected.ir.msl
index 3df13c5..291ef8b 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/2a48dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2a48dc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_2a48dc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2a48dc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2a48dc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_2a48dc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.ir.msl
index 59794cc..925a6a7 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2d95ea(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2d95ea(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/327d70.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/327d70.wgsl.expected.ir.msl
index 72b701a..97b0066 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/327d70.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/327d70.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_327d70(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_327d70(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_327d70(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_327d70(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/32ca10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/32ca10.wgsl.expected.ir.msl
index bd7c73d..9d9d39e 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/32ca10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/32ca10.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_32ca10(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_32ca10(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_32ca10(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_32ca10(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3465ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/3465ec.wgsl.expected.ir.msl
index d8fb45e..0479076 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/3465ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3465ec.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_3465ec(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3465ec(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3465ec(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_3465ec(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/34cefa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/34cefa.wgsl.expected.ir.msl
index 1853b9e..aa39066 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/34cefa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/34cefa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_34cefa(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_34cefa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3580ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/3580ab.wgsl.expected.ir.msl
index 9a25bc1..bbdd5ca 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/3580ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3580ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_3580ab(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3580ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3580ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_3580ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.ir.msl
index 7689e7e..e4525a9 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_379cc5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_379cc5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/37bc8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/37bc8a.wgsl.expected.ir.msl
index 0228025..cf8b553 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/37bc8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/37bc8a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_37bc8a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_37bc8a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_37bc8a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_37bc8a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/380a60.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/380a60.wgsl.expected.ir.msl
index c8243d0..f3a7c66 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/380a60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/380a60.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_380a60(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_380a60(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_380a60(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_380a60(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.ir.msl
index 169a2cc..dedb6497 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3ad143(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3ad143(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.ir.msl
index 499861e..8e420ba 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3eff89(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3eff89(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.ir.msl
index 81c70d4..9aa91cb 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_485774(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_485774(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.msl
index 1dd6576..8fa9d3c 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_48ef47(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_48ef47(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.ir.msl
index a4e7c11..ac5977d 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4adaad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4adaad(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4c4333.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/4c4333.wgsl.expected.ir.msl
index 937d780..b55b33c 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/4c4333.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4c4333.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_4c4333(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4c4333(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4c4333(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_4c4333(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/520086.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/520086.wgsl.expected.ir.msl
index 69f98ff..0feff8d 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/520086.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/520086.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_520086(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_520086(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_520086(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_520086(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.ir.msl
index ed88b05..ae8a1b6 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_52dfc5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_52dfc5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/54a654.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/54a654.wgsl.expected.ir.msl
index 3a4596b..14f0c42 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/54a654.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/54a654.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_54a654(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_54a654(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_54a654(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_54a654(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.ir.msl
index 802ba9f..487fb87 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_555f67(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_555f67(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/59cc27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/59cc27.wgsl.expected.ir.msl
index 0cdf5de..d612c7b 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/59cc27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/59cc27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59cc27(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59cc27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/59eb57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/59eb57.wgsl.expected.ir.msl
index 8b97f63..559ff77 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/59eb57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/59eb57.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_59eb57(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59eb57(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59eb57(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_59eb57(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5ee8f2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/5ee8f2.wgsl.expected.ir.msl
index 2d49907..ea7cec4 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/5ee8f2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5ee8f2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_5ee8f2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5ee8f2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5ee8f2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_5ee8f2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.ir.msl
index 3c4af6c..fdea774 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5f20d1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5f20d1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/61bd23.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/61bd23.wgsl.expected.ir.msl
index 1aced88..268ec29 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/61bd23.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/61bd23.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_61bd23(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_61bd23(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_61bd23(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_61bd23(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/622aa2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/622aa2.wgsl.expected.ir.msl
index b03fcbd..f849d51 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/622aa2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/622aa2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_622aa2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_622aa2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_622aa2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_622aa2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/6b4321.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/6b4321.wgsl.expected.ir.msl
index 2f161fb..5ad0639 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/6b4321.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/6b4321.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6b4321(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6b4321(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/6da0eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/6da0eb.wgsl.expected.ir.msl
index 56e6bfd..e57ddcb 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/6da0eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/6da0eb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_6da0eb(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6da0eb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6da0eb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_6da0eb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/77be7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/77be7b.wgsl.expected.ir.msl
index 067c973..4b20655 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/77be7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/77be7b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_77be7b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_77be7b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.ir.msl
index 530a112..b396032 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7895f4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7895f4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7f28cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/7f28cf.wgsl.expected.ir.msl
index f92682d..e9bb83b 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/7f28cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7f28cf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_7f28cf(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7f28cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7f28cf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_7f28cf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/8356f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/8356f7.wgsl.expected.ir.msl
index bde6fb7..3804c17 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/8356f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/8356f7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_8356f7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8356f7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8356f7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8356f7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/878dea.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/878dea.wgsl.expected.ir.msl
index d73fc69..d36d055 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/878dea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/878dea.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_878dea(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_878dea(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_878dea(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_878dea(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/87faad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/87faad.wgsl.expected.ir.msl
index 2dcabcf..82504e3 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/87faad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/87faad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_87faad(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_87faad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_87faad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_87faad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/8ac32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/8ac32a.wgsl.expected.ir.msl
index 781596f..cc96d8d 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/8ac32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/8ac32a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8ac32a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8ac32a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/8bd987.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/8bd987.wgsl.expected.ir.msl
index 1f6ca9a..9207723 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/8bd987.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/8bd987.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_8bd987(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8bd987(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8bd987(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8bd987(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/8dbf23.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/8dbf23.wgsl.expected.ir.msl
index 65619bb..a6698d1 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/8dbf23.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/8dbf23.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_8dbf23(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8dbf23(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8dbf23(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8dbf23(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/8e1bd0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/8e1bd0.wgsl.expected.ir.msl
index afc7536..ddf3ba7 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/8e1bd0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/8e1bd0.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_8e1bd0(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8e1bd0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8e1bd0(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8e1bd0(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.ir.msl
index 6e9de2b..44e74cf 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_90b8cc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_90b8cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9695c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/9695c6.wgsl.expected.ir.msl
index a6cfc01..d0f991f 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/9695c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9695c6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_9695c6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9695c6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9695c6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_9695c6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/98a9cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/98a9cf.wgsl.expected.ir.msl
index 38ec6ca..90e5c04 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/98a9cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/98a9cf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_98a9cf(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_98a9cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_98a9cf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_98a9cf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.ir.msl
index 29e8707..aae8862 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9c60e3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9c60e3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/a54655.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/a54655.wgsl.expected.ir.msl
index 2f336e8..92e4deb 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/a54655.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/a54655.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_a54655(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a54655(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a54655(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_a54655(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.msl
index 6553094..6c0096c 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a9d3f5(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a9d3f5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/aac630.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/aac630.wgsl.expected.ir.msl
index fe39eb3..f023429 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/aac630.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/aac630.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_aac630(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_aac630(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_aac630(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_aac630(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.ir.msl
index 6244f15..5e26c90 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_bf2f76(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_bf2f76(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/c1eca9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/c1eca9.wgsl.expected.ir.msl
index cfa05fe..7e8b705 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/c1eca9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/c1eca9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_c1eca9(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_c1eca9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.ir.msl
index 7211154..1a300e3 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3e21f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3e21f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3f655.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/d3f655.wgsl.expected.ir.msl
index 004b002..3f993ed 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/d3f655.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3f655.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_d3f655(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3f655(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3f655(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_d3f655(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d75a0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/d75a0b.wgsl.expected.ir.msl
index 0104cc6..7f102f4 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/d75a0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d75a0b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_d75a0b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d75a0b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d75a0b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_d75a0b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/de8087.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/de8087.wgsl.expected.ir.msl
index 66b6105..92a47b4 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/de8087.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/de8087.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_de8087(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_de8087(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_de8087(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_de8087(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/e47aac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/e47aac.wgsl.expected.ir.msl
index 209458a..c6c6f48 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/e47aac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/e47aac.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_e47aac(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_e47aac(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_e47aac(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_e47aac(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.ir.msl
index 55fa6ea..fb937c4 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_f1783f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_f1783f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/181090.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/181090.wgsl.expected.ir.msl
index 3139f6b..a03c653 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/181090.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/181090.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_181090(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_181090(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/1a3fa9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/1a3fa9.wgsl.expected.ir.msl
index 837997a..f582b45 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/1a3fa9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/1a3fa9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a3fa9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a3fa9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/1a7fc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/1a7fc3.wgsl.expected.ir.msl
index c9440ec..30aae09 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/1a7fc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/1a7fc3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a7fc3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a7fc3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/2267d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/2267d8.wgsl.expected.ir.msl
index 64cdb41..5836fbb 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/2267d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/2267d8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2267d8(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2267d8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/24b2c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/24b2c6.wgsl.expected.ir.msl
index b611646..49e6ead 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/24b2c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/24b2c6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_24b2c6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_24b2c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/2bea6c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/2bea6c.wgsl.expected.ir.msl
index 55346bf..06e1d1d 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/2bea6c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/2bea6c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2bea6c(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2bea6c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/2df1ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/2df1ab.wgsl.expected.ir.msl
index e86b8ac..6f5dbcc 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/2df1ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/2df1ab.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2df1ab(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2df1ab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/46dbd8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/46dbd8.wgsl.expected.ir.msl
index bab2eb3..6a6fedb 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/46dbd8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/46dbd8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_46dbd8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_46dbd8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/60d9b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/60d9b8.wgsl.expected.ir.msl
index 55db78c..683d527 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/60d9b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/60d9b8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_60d9b8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_60d9b8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/903920.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/903920.wgsl.expected.ir.msl
index cd39a13..6dd5c33 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/903920.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/903920.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_903920(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_903920(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/9a1a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/9a1a65.wgsl.expected.ir.msl
index f7195d4..160828f 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/9a1a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/9a1a65.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_9a1a65(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_9a1a65(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/adc783.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/adc783.wgsl.expected.ir.msl
index 5fe346e..a2e0b65 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/adc783.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/adc783.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_adc783(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_adc783(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/ae911c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/ae911c.wgsl.expected.ir.msl
index e781542..d28ba24 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/ae911c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/ae911c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ae911c(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ae911c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/c386c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/c386c8.wgsl.expected.ir.msl
index 47276be..80b3f96 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/c386c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/c386c8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c386c8(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c386c8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/c399f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/c399f9.wgsl.expected.ir.msl
index eba6930..3d6cf2d 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/c399f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/c399f9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c399f9(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c399f9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/c8c25c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/c8c25c.wgsl.expected.ir.msl
index f35af66..fe88698 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/c8c25c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/c8c25c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c8c25c(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c8c25c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/d63126.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/d63126.wgsl.expected.ir.msl
index db7aa58..87cc3bb 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/d63126.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/d63126.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d63126(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d63126(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/d8f73b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/d8f73b.wgsl.expected.ir.msl
index 49c1304..6b4ae29 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/d8f73b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/d8f73b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d8f73b(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d8f73b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/ef7944.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/ef7944.wgsl.expected.ir.msl
index fdb8e6b..c1c8a15 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/ef7944.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/ef7944.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ef7944(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ef7944(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/efd6df.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/efd6df.wgsl.expected.ir.msl
index a10199e..f111c88 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/efd6df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/efd6df.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_efd6df(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_efd6df(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/f742c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/f742c0.wgsl.expected.ir.msl
index 0c2f36e..d4e2788 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/f742c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/f742c0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_f742c0(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_f742c0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumLevels/fe2171.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumLevels/fe2171.wgsl.expected.ir.msl
index 0a1b5f9..85691ac 100644
--- a/test/tint/builtins/gen/literal/textureNumLevels/fe2171.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumLevels/fe2171.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_fe2171(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_fe2171(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumSamples/50f399.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumSamples/50f399.wgsl.expected.ir.msl
index a47605b..780a9b4 100644
--- a/test/tint/builtins/gen/literal/textureNumSamples/50f399.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumSamples/50f399.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_50f399(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_50f399(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumSamples/c1a777.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumSamples/c1a777.wgsl.expected.ir.msl
index 4246b6f..b861ba3 100644
--- a/test/tint/builtins/gen/literal/textureNumSamples/c1a777.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumSamples/c1a777.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_c1a777(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_c1a777(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumSamples/dbb799.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumSamples/dbb799.wgsl.expected.ir.msl
index e5bf2fd..8e9acd7 100644
--- a/test/tint/builtins/gen/literal/textureNumSamples/dbb799.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumSamples/dbb799.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_dbb799(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_dbb799(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureNumSamples/ecd321.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureNumSamples/ecd321.wgsl.expected.ir.msl
index e8812c4..3bd852a 100644
--- a/test/tint/builtins/gen/literal/textureNumSamples/ecd321.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureNumSamples/ecd321.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device uint* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_ecd321(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_ecd321(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.ir.msl
index 981469e..6416bff 100644
--- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_0dff6c(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_0dff6c(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.ir.msl
index 902e8e0..6a5d8df 100644
--- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_17e988(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_17e988(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.ir.msl
index c0e9914..6fb7f19 100644
--- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_193203(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_193203(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.ir.msl
index 80273e5..35069b4 100644
--- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_1a4e1b(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_1a4e1b(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.ir.msl
index 95f3b32..9a83383 100644
--- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_2149ec(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_2149ec(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.ir.msl
index eeec97f..ac8edc0 100644
--- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_38bbb9(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_38bbb9(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.ir.msl
index 15ecae6..53c3ca2 100644
--- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_3b50bd(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_3b50bd(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.ir.msl
index d351c1e..56ec057 100644
--- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_4703d0(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_4703d0(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.ir.msl
index 01ab430..4f21ef0 100644
--- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_4dd1bf(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_4dd1bf(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.ir.msl
index 406053a..333828b 100644
--- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_51b514(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_51b514(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.ir.msl
index 84239c9..e0a8675 100644
--- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_60bf45(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_60bf45(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.ir.msl
index 89451ef..64ea246 100644
--- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_6717ca(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_6717ca(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.ir.msl
index c6c8650..83459b8 100644
--- a/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture1d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_6e64fb(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_6e64fb(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.ir.msl
index 644a690..26a587d 100644
--- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_7e9ffd(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_7e9ffd(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.ir.msl
index 02ba085..17e953f 100644
--- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_7fd8cb(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_7fd8cb(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.ir.msl
index dab4f8f..d0fbd40 100644
--- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_85c4ba(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_85c4ba(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.ir.msl
index 21d0564..db8657c 100644
--- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_bc7477(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_bc7477(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.ir.msl
index 669b03a..5eb2efc 100644
--- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_c2f4e8(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_c2f4e8(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.ir.msl
index 701e039..fdbfba5 100644
--- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_d6b281(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_d6b281(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.ir.msl
index 544e2cd..c8efd7b 100644
--- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_e53267(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_e53267(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.ir.msl
index 60228f0..552193d 100644
--- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_ea7030(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_ea7030(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
index 05427e8..cfaab81 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
@@ -30,11 +30,11 @@
 };
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -85,13 +85,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_7c04e6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_7c04e6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
index 91a6ff0..d383fc9 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_9ca02c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_9ca02c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.msl
index 5efbf5f..fbee790 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_1c707e(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_1c707e(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.ir.msl
index 613cd9e..d09e0b9 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_53b9f7(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_53b9f7(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.ir.msl
index 5efe956..669ac92 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_594824(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_594824(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.ir.msl
index 37b7098..8261d83 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_6a9113(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_6a9113(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl
index 7128437..75883a3 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_80e579(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_80e579(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.msl
index c1d8c8e..5fc3e2a 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_87915c(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_87915c(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl
index d84af2c..d0e58d7 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_9dbb51(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_9dbb51(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.ir.msl
index 2f3c88d..5c4286b 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_a161cf(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_a161cf(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.msl
index c56d35d..3ee58f5 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_c6953d(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_c6953d(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.ir.msl
index bb02205..e55c864 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_d3fa1b(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_d3fa1b(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl
index f2eb015..9daaa19 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_eed7c4(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_eed7c4(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.msl
index 462d632..4f5bc17 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_1912e5(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_1912e5(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.msl
index 110f30e..206cfb0 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_3a5923(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_3a5923(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.msl
index 6f879d3..53f00ec 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_63fb83(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_63fb83(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.msl
index 40e1168..331d809 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_7b5025(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_7b5025(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.msl
index c7a80cf..757de0e 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_90ae56(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_90ae56(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
index 43f4368..d852f04 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_a3ca7e(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_a3ca7e(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.msl
index 7c098df..6354072 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_af1051(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_af1051(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.msl
index 0d23db7..de7b936 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_dd431d(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_dd431d(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.msl
index 2ea6bd5..9fce217 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_dec064(tint_module_vars_struct tint_module_vars) {
@@ -12,7 +12,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_dec064(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
index a71a2fd..c2d7778 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1116ed(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1116ed(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl
index 9396524..757906a 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1568e3(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1568e3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl
index f6a8319..fbe2b28 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_2ad2b1(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_2ad2b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
index d93bf0a..fa252d2 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_4cf3a2(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_4cf3a2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl
index e9bfb7a..ba0ae26 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7dc3c0(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7dc3c0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl
index ed60e6a..4e7b3e0 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7f2b9a(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7f2b9a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl
index 8207334..1207e64 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_958c87(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_958c87(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
index fb7b8c9..c2cb4d6 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_b6e47c(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_b6e47c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl
index fd25ed0..aa8581b 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_bcb3dd(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_bcb3dd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.ir.msl
index 284f8ce..22831e5 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_21402b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_21402b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
index e2d6911..8e2cb64 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_2ecd8f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_2ecd8f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.ir.msl
index 1c7a433..9bee971 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_521263(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_521263(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.ir.msl
index ad4164a..e697991 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5312f4(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5312f4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.ir.msl
index d735b8b..c7af1ae 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5884dd(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5884dd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.ir.msl
index d294225..9c21557 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_7cd6de(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_7cd6de(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.ir.msl
index 1f6c6cc..674fb8a 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_a09131(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_a09131(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.ir.msl
index b13c003..e957bcf 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_bbb58f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_bbb58f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl
index 46f9be4..428ee39 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d4e3c5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d4e3c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl
index d998b54..ac6a132 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d65515(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d65515(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl
index 2c642ea..7592358 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_e383db(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_e383db(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.ir.msl
index 224f426..21a28fa 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_02be59(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_02be59(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl
index b6de861..434bd47 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0b0a1b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0b0a1b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
index 6c3c2c0..6e8f730 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0bdd9a(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0bdd9a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.ir.msl
index 492253c..d79c8dc 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1b0291(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1b0291(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
index 5b94aab..5b4527e2 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1bf73e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1bf73e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.ir.msl
index e1cace2..13ec389 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_265cc7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_265cc7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl
index f07cf73..3db2ccc 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_2974eb(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_2974eb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl
index 1091959..9759e41 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_302be4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_302be4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl
index db1b529..19fd422 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36780e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36780e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
index 096bdf4..99a9955 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36f0d3(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36f0d3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.ir.msl
index 770fe61..04fa2a2 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_3c3442(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_3c3442(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.ir.msl
index 08aeeee..4568939 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_615583(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_615583(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.ir.msl
index 617fa8d..ca64678 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_73e892(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_73e892(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.ir.msl
index 30976f1..6f1971f 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_749baf(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_749baf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.ir.msl
index c281618..91a73df 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_941a53(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_941a53(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl
index b785409..24b1c62 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_a12142(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_a12142(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.ir.msl
index 7d19d4d..d46885b 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_aab3b9(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_aab3b9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.ir.msl
index 27b6c81..9a07091 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_abfcc0(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_abfcc0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
index 8d6cb9f..c299dfe 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae5e39(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae5e39(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.ir.msl
index 3271a66..c4cd70b 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae92a2(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae92a2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
index 3ac0b39..b436f05 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_b7c55c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_b7c55c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.ir.msl
index 3d7cdd0..3e8670d 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c32df7(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c32df7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.ir.msl
index cee84e6..cffb77c 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c6aca6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c6aca6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl
index 7126e03..54c4642 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_cdfe0f(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_cdfe0f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.ir.msl
index cc28fe5..f6b4123 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_dcbecb(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_dcbecb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl
index 60680df..4cefb71 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_e6ce9e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_e6ce9e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl
index e7bada4..1b34ac9 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_f3b2c8(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_f3b2c8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.ir.msl
index 1699b58..2553576 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_faa6d7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_faa6d7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.ir.msl
index 23ce955..3beea59 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ff11bc(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ff11bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
index 7363275..d90a15f 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup uint* arg_0;
   device uint* prevent_dce;
+  threadgroup uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_37307c(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
index d3bf46d..faffffa 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup float* arg_0;
   device float* prevent_dce;
+  threadgroup float* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_7a857c(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device float* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
index e4eaff7..a304788 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup int* arg_0;
   device int* prevent_dce;
+  threadgroup int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_9d33de(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
index e23c148..89750d6 100644
--- a/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup half* arg_0;
   device half* prevent_dce;
+  threadgroup half* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_e07d08(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device half* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device half* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl
index 3198de1..bb4c1ed 100644
--- a/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/1588cd.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_1588cd(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_1588cd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl
index 65b2662..333bef1 100644
--- a/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/61b1c7.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_61b1c7(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_61b1c7(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_61b1c7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_61b1c7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl
index 29c63bf..e990af6 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_8421b9(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_8421b9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl
index 73d9087..6865212 100644
--- a/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/a0f5ca.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_a0f5ca(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_a0f5ca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl
index 1d88fc5..dc05097 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_cbd6b5(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 2u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cbd6b5(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cbd6b5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_cbd6b5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl
index e90fb29..a112177 100644
--- a/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cdd123.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_cdd123(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cdd123(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cdd123(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_cdd123(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl
index 91ae415..f4b5f28 100644
--- a/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cfca0a.wgsl.expected.ir.msl
@@ -18,8 +18,8 @@
 };
 
 struct tint_module_vars_struct {
-  const device SB_RO* sb_ro;
   device uint* prevent_dce;
+  const device SB_RO* sb_ro;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
@@ -38,13 +38,13 @@
   return res;
 }
 
-fragment void fragment_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cfca0a(tint_module_vars);
 }
 
-kernel void compute_main(const device SB_RO* sb_ro [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_ro=sb_ro, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], const device SB_RO* sb_ro [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_ro=sb_ro, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_cfca0a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl
index 9c17fb3..9a7302b 100644
--- a/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/arrayLength/eb510f.wgsl.expected.ir.msl
@@ -18,45 +18,22 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
   const constant tint_array<uint4, 1>* tint_storage_buffer_sizes;
 };
 
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
-};
-
 uint arrayLength_eb510f(tint_module_vars_struct tint_module_vars) {
   uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u);
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_eb510f(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
   (*tint_module_vars.prevent_dce) = arrayLength_eb510f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = arrayLength_eb510f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes [[buffer(30)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .tint_storage_buffer_sizes=tint_storage_buffer_sizes};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl
index 5eb535e..9b680a8 100644
--- a/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/794055.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicAdd_794055(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl
index 8ac867c..e50af22 100644
--- a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicAdd_8a199a(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_8a199a(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_8a199a(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl
index 3296daa..59b7d9b 100644
--- a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicAdd_d32fe4(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_d32fe4(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAdd_d32fe4(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl
index 29978b6..3f4592c 100644
--- a/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAdd/d5db1d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicAdd_d5db1d(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl
index 8bf3486..37c005e 100644
--- a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicAnd_152966(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_152966(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_152966(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl
index 19ed329..f0e2cdf 100644
--- a/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/34edd3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicAnd_34edd3(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl
index 0f6ea76..61efb42 100644
--- a/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/45a819.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicAnd_45a819(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl
index e5a9dbc..ad84e65 100644
--- a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicAnd_85a8d9(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_85a8d9(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicAnd_85a8d9(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl
index 48dac26..95c32b7 100644
--- a/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/0a5dca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicExchange_0a5dca(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl
index fecc511..af3fc7e 100644
--- a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicExchange_d59712(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_d59712(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_d59712(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl
index 592c3ad..f5fff32 100644
--- a/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/e114ba.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicExchange_e114ba(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl
index 2cb02ea..bf41aba 100644
--- a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicExchange_f2e22f(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_f2e22f(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicExchange_f2e22f(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl
index 08b4826..97bce3e 100644
--- a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicLoad_0806ad(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_0806ad(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_0806ad(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl
index 1f3e31d..6ced326 100644
--- a/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/361bf1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicLoad_361bf1(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl
index 486f376..08c566c 100644
--- a/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/afcc03.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -23,7 +23,7 @@
   (*tint_module_vars.prevent_dce) = atomicLoad_afcc03(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl
index 7c18a05..2ca2601 100644
--- a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicLoad_fe6cc3(tint_module_vars_struct tint_module_vars) {
@@ -15,12 +15,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_fe6cc3(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicLoad_fe6cc3(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl
index cb1b8aa..ac62ba7 100644
--- a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicMax_51b9be(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_51b9be(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_51b9be(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl
index 9b47709..46bc52a 100644
--- a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicMax_92aa72(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_92aa72(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMax_92aa72(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl
index a75485d..d8a5f95 100644
--- a/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/a89cc3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicMax_a89cc3(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl
index f3b69da..0cd324b 100644
--- a/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMax/beccfc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicMax_beccfc(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl
index c28d7bb..92f7ba2 100644
--- a/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/278235.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicMin_278235(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl
index 93f8b48..3b475fe 100644
--- a/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/69d383.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicMin_69d383(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl
index 0702df2..d3d8ce6 100644
--- a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicMin_8e38dc(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_8e38dc(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_8e38dc(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl
index 40c9acd..24958e1 100644
--- a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicMin_c67a74(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_c67a74(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicMin_c67a74(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl
index 02a6b61..e273b46 100644
--- a/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/5e3d61.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicOr_5e3d61(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl
index 4a6eb69..0cf7246 100644
--- a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicOr_5e95d4(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_5e95d4(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_5e95d4(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl
index 82ffe8f..3de174c 100644
--- a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicOr_8d96a0(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_8d96a0(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicOr_8d96a0(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl
index f02dc37..d489fb4 100644
--- a/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicOr/d09248.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicOr_d09248(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl
index 22c9f54..534153b 100644
--- a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicSub_051100(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_051100(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_051100(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl
index 32259d2..1ac0133 100644
--- a/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/0d26c2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicSub_0d26c2(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl
index a3c34d2..f4ca029 100644
--- a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicSub_15bfc9(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_15bfc9(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicSub_15bfc9(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl
index 6131f5c..52cf3e0 100644
--- a/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicSub/77883a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicSub_77883a(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl
index 8fde4d1..141734a 100644
--- a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device uint* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 uint atomicXor_54510e(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_54510e(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_54510e(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl
index 04bf8bf..5311335 100644
--- a/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/75dc95.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_int* arg_0;
   device int* prevent_dce;
+  threadgroup atomic_int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicXor_75dc95(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl
index 234bbe4..0a7f36a 100644
--- a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.ir.msl
@@ -6,8 +6,8 @@
 };
 
 struct tint_module_vars_struct {
-  device SB_RW* sb_rw;
   device int* prevent_dce;
+  device SB_RW* sb_rw;
 };
 
 int atomicXor_c1b78c(tint_module_vars_struct tint_module_vars) {
@@ -16,12 +16,12 @@
   return res;
 }
 
-fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_c1b78c(tint_module_vars);
 }
 
-kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
+kernel void compute_main(device int* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
   (*tint_module_vars.prevent_dce) = atomicXor_c1b78c(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl
index 08ebd79..b0fe563 100644
--- a/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/atomicXor/c8e6be.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup atomic_uint* arg_0;
   device uint* prevent_dce;
+  threadgroup atomic_uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -24,7 +24,7 @@
   (*tint_module_vars.prevent_dce) = atomicXor_c8e6be(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl
index 0f67064..00ec0fe 100644
--- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.ir.msl
@@ -1,42 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
-}
-
-%dot4I8Packed_881e62 = func():void {
-  $B2: {
-    %arg_0:ptr<function, u32, read_write> = var, 1u
-    %arg_1:ptr<function, u32, read_write> = var, 1u
-    %5:u32 = load %arg_0
-    %6:u32 = load %arg_1
-    %7:i32 = dot4I8Packed %5, %6
-    %res:ptr<function, i32, read_write> = var, %7
-    %9:i32 = load %res
-    store %prevent_dce, %9
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %11:void = call %dot4I8Packed_881e62
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %13:void = call %dot4I8Packed_881e62
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %15:void = call %dot4I8Packed_881e62
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: dot4I8Packed
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.ir.msl
index 49416f8..e0f4a9e 100644
--- a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.ir.msl
@@ -1,42 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%dot4U8Packed_fbed7b = func():void {
-  $B2: {
-    %arg_0:ptr<function, u32, read_write> = var, 1u
-    %arg_1:ptr<function, u32, read_write> = var, 1u
-    %5:u32 = load %arg_0
-    %6:u32 = load %arg_1
-    %7:u32 = dot4U8Packed %5, %6
-    %res:ptr<function, u32, read_write> = var, %7
-    %9:u32 = load %res
-    store %prevent_dce, %9
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %11:void = call %dot4U8Packed_fbed7b
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %13:void = call %dot4U8Packed_fbed7b
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %15:void = call %dot4U8Packed_fbed7b
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: dot4U8Packed
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.msl
index 1423d26..800a5ce 100644
--- a/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: frexp
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: frexp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.ir.msl
index aaa5944..88b650d 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%pack2x16float_0e97b3 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
-    %4:vec2<f32> = load %arg_0
-    %5:u32 = pack2x16float %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %pack2x16float_0e97b3
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %pack2x16float_0e97b3
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %pack2x16float_0e97b3
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: pack2x16float
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.msl
index 6de1757..54dc7a0 100644
--- a/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%pack4xI8_bfce01 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
-    %4:vec4<i32> = load %arg_0
-    %5:u32 = pack4xI8 %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %pack4xI8_bfce01
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %pack4xI8_bfce01
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %pack4xI8_bfce01
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: pack4xI8
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl
index 09252b5..0dec447 100644
--- a/test/tint/builtins/gen/var/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack4xI8Clamp/e42b2a.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%pack4xI8Clamp_e42b2a = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
-    %4:vec4<i32> = load %arg_0
-    %5:u32 = pack4xI8Clamp %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %pack4xI8Clamp_e42b2a
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %pack4xI8Clamp_e42b2a
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %pack4xI8Clamp_e42b2a
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: pack4xI8Clamp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/pack4xU8/b70b53.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack4xU8/b70b53.wgsl.expected.ir.msl
index 6a8baa9..d00ef6f 100644
--- a/test/tint/builtins/gen/var/pack4xU8/b70b53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack4xU8/b70b53.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%pack4xU8_b70b53 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
-    %4:vec4<u32> = load %arg_0
-    %5:u32 = pack4xU8 %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %pack4xU8_b70b53
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %pack4xU8_b70b53
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %pack4xU8_b70b53
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: pack4xU8
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl
index 6d1c228..f45f7af 100644
--- a/test/tint/builtins/gen/var/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/pack4xU8Clamp/6b8c1b.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%pack4xU8Clamp_6b8c1b = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
-    %4:vec4<u32> = load %arg_0
-    %5:u32 = pack4xU8Clamp %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %pack4xU8Clamp_6b8c1b
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %pack4xU8Clamp_6b8c1b
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %pack4xU8Clamp_6b8c1b
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: pack4xU8Clamp
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/sign/3233fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/3233fa.wgsl.expected.ir.msl
index 3e352fd..3ee2a5d 100644
--- a/test/tint/builtins/gen/var/sign/3233fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/3233fa.wgsl.expected.ir.msl
@@ -1,43 +1,56 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+#include <metal_stdlib>
+using namespace metal;
+
+struct tint_module_vars_struct {
+  device int* prevent_dce;
+};
+
+struct VertexOutput {
+  float4 pos;
+  int prevent_dce;
+};
+
+struct vertex_main_outputs {
+  float4 VertexOutput_pos [[position]];
+  int VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+};
+
+int sign_3233fa() {
+  int arg_0 = 1;
+  int res = sign(arg_0);
+  return res;
 }
 
-%sign_3233fa = func():void {
-  $B2: {
-    %arg_0:ptr<function, i32, read_write> = var, 1i
-    %4:i32 = load %arg_0
-    %5:i32 = sign %4
-    %res:ptr<function, i32, read_write> = var, %5
-    %7:i32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %sign_3233fa
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %sign_3233fa
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %sign_3233fa
-    ret
-  }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_3233fa();
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_3233fa();
+}
+
+VertexOutput vertex_main_inner() {
+  VertexOutput out = {};
+  out.pos = float4(0.0f);
+  out.prevent_dce = sign_3233fa();
+  return out;
+}
+
+vertex vertex_main_outputs vertex_main() {
+  VertexOutput const v = vertex_main_inner();
+  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
+}
+program_source:20:13: error: call to 'sign' is ambiguous
+  int res = sign(arg_0);
+            ^~~~
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:303:17: note: candidate function
+METAL_FUNC half sign(half x)
+                ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:409:18: note: candidate function
+METAL_FUNC float sign(float x)
+                 ^
+
diff --git a/test/tint/builtins/gen/var/sign/58d779.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/58d779.wgsl.expected.ir.msl
index 87daa61..8fb979b 100644
--- a/test/tint/builtins/gen/var/sign/58d779.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/58d779.wgsl.expected.ir.msl
@@ -1,43 +1,74 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+#include <metal_stdlib>
+using namespace metal;
+
+struct tint_module_vars_struct {
+  device int4* prevent_dce;
+};
+
+struct VertexOutput {
+  float4 pos;
+  int4 prevent_dce;
+};
+
+struct vertex_main_outputs {
+  float4 VertexOutput_pos [[position]];
+  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+};
+
+int4 sign_58d779() {
+  int4 arg_0 = int4(1);
+  int4 res = sign(arg_0);
+  return res;
 }
 
-%sign_58d779 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
-    %4:vec4<i32> = load %arg_0
-    %5:vec4<i32> = sign %4
-    %res:ptr<function, vec4<i32>, read_write> = var, %5
-    %7:vec4<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %sign_58d779
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %sign_58d779
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %sign_58d779
-    ret
-  }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_58d779();
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_58d779();
+}
+
+VertexOutput vertex_main_inner() {
+  VertexOutput out = {};
+  out.pos = float4(0.0f);
+  out.prevent_dce = sign_58d779();
+  return out;
+}
+
+vertex vertex_main_outputs vertex_main() {
+  VertexOutput const v = vertex_main_inner();
+  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
+}
+program_source:20:14: error: no matching function for call to 'sign'
+  int4 res = sign(arg_0);
+             ^~~~
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:303:17: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'half' for 1st argument
+METAL_FUNC half sign(half x)
+                ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:320:18: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'metal::half2' (aka 'half2') for 1st argument
+METAL_FUNC half2 sign(half2 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:337:18: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'metal::half3' (aka 'half3') for 1st argument
+METAL_FUNC half3 sign(half3 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:354:18: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'metal::half4' (aka 'half4') for 1st argument
+METAL_FUNC half4 sign(half4 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:409:18: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'float' for 1st argument
+METAL_FUNC float sign(float x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:426:19: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'metal::float2' (aka 'float2') for 1st argument
+METAL_FUNC float2 sign(float2 x)
+                  ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:443:19: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'metal::float3' (aka 'float3') for 1st argument
+METAL_FUNC float3 sign(float3 x)
+                  ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:460:19: note: candidate function not viable: no known conversion from 'int4' (vector of 4 'int' values) to 'metal::float4' (aka 'float4') for 1st argument
+METAL_FUNC float4 sign(float4 x)
+                  ^
+
diff --git a/test/tint/builtins/gen/var/sign/926015.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/926015.wgsl.expected.ir.msl
index b7f5378..a413013 100644
--- a/test/tint/builtins/gen/var/sign/926015.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/926015.wgsl.expected.ir.msl
@@ -1,43 +1,74 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+#include <metal_stdlib>
+using namespace metal;
+
+struct tint_module_vars_struct {
+  device int2* prevent_dce;
+};
+
+struct VertexOutput {
+  float4 pos;
+  int2 prevent_dce;
+};
+
+struct vertex_main_outputs {
+  float4 VertexOutput_pos [[position]];
+  int2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+};
+
+int2 sign_926015() {
+  int2 arg_0 = int2(1);
+  int2 res = sign(arg_0);
+  return res;
 }
 
-%sign_926015 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
-    %4:vec2<i32> = load %arg_0
-    %5:vec2<i32> = sign %4
-    %res:ptr<function, vec2<i32>, read_write> = var, %5
-    %7:vec2<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %sign_926015
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %sign_926015
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %sign_926015
-    ret
-  }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_926015();
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_926015();
+}
+
+VertexOutput vertex_main_inner() {
+  VertexOutput out = {};
+  out.pos = float4(0.0f);
+  out.prevent_dce = sign_926015();
+  return out;
+}
+
+vertex vertex_main_outputs vertex_main() {
+  VertexOutput const v = vertex_main_inner();
+  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
+}
+program_source:20:14: error: no matching function for call to 'sign'
+  int2 res = sign(arg_0);
+             ^~~~
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:303:17: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'half' for 1st argument
+METAL_FUNC half sign(half x)
+                ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:320:18: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'metal::half2' (aka 'half2') for 1st argument
+METAL_FUNC half2 sign(half2 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:337:18: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'metal::half3' (aka 'half3') for 1st argument
+METAL_FUNC half3 sign(half3 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:354:18: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'metal::half4' (aka 'half4') for 1st argument
+METAL_FUNC half4 sign(half4 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:409:18: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'float' for 1st argument
+METAL_FUNC float sign(float x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:426:19: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'metal::float2' (aka 'float2') for 1st argument
+METAL_FUNC float2 sign(float2 x)
+                  ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:443:19: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'metal::float3' (aka 'float3') for 1st argument
+METAL_FUNC float3 sign(float3 x)
+                  ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:460:19: note: candidate function not viable: no known conversion from 'int2' (vector of 2 'int' values) to 'metal::float4' (aka 'float4') for 1st argument
+METAL_FUNC float4 sign(float4 x)
+                  ^
+
diff --git a/test/tint/builtins/gen/var/sign/9603b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/sign/9603b1.wgsl.expected.ir.msl
index 3ccbe81..9676d8f 100644
--- a/test/tint/builtins/gen/var/sign/9603b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/sign/9603b1.wgsl.expected.ir.msl
@@ -1,43 +1,74 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+#include <metal_stdlib>
+using namespace metal;
+
+struct tint_module_vars_struct {
+  device int3* prevent_dce;
+};
+
+struct VertexOutput {
+  float4 pos;
+  int3 prevent_dce;
+};
+
+struct vertex_main_outputs {
+  float4 VertexOutput_pos [[position]];
+  int3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+};
+
+int3 sign_9603b1() {
+  int3 arg_0 = int3(1);
+  int3 res = sign(arg_0);
+  return res;
 }
 
-%sign_9603b1 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
-    %4:vec3<i32> = load %arg_0
-    %5:vec3<i32> = sign %4
-    %res:ptr<function, vec3<i32>, read_write> = var, %5
-    %7:vec3<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %sign_9603b1
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %sign_9603b1
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %sign_9603b1
-    ret
-  }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_9603b1();
 }
 
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+  (*tint_module_vars.prevent_dce) = sign_9603b1();
+}
+
+VertexOutput vertex_main_inner() {
+  VertexOutput out = {};
+  out.pos = float4(0.0f);
+  out.prevent_dce = sign_9603b1();
+  return out;
+}
+
+vertex vertex_main_outputs vertex_main() {
+  VertexOutput const v = vertex_main_inner();
+  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
+}
+program_source:20:14: error: no matching function for call to 'sign'
+  int3 res = sign(arg_0);
+             ^~~~
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:303:17: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'half' for 1st argument
+METAL_FUNC half sign(half x)
+                ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:320:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::half2' (aka 'half2') for 1st argument
+METAL_FUNC half2 sign(half2 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:337:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::half3' (aka 'half3') for 1st argument
+METAL_FUNC half3 sign(half3 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:354:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::half4' (aka 'half4') for 1st argument
+METAL_FUNC half4 sign(half4 x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:409:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'float' for 1st argument
+METAL_FUNC float sign(float x)
+                 ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:426:19: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::float2' (aka 'float2') for 1st argument
+METAL_FUNC float2 sign(float2 x)
+                  ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:443:19: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::float3' (aka 'float3') for 1st argument
+METAL_FUNC float3 sign(float3 x)
+                  ^
+/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:460:19: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::float4' (aka 'float4') for 1st argument
+METAL_FUNC float4 sign(float4 x)
+                  ^
+
diff --git a/test/tint/builtins/gen/var/subgroupBallot/7e6d0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBallot/7e6d0e.wgsl.expected.ir.msl
index c9de677..a839299 100644
--- a/test/tint/builtins/gen/var/subgroupBallot/7e6d0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBallot/7e6d0e.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBallot_7e6d0e = func():void {
-  $B2: {
-    %3:vec4<u32> = subgroupBallot
-    %res:ptr<function, vec4<u32>, read_write> = var, %3
-    %5:vec4<u32> = load %res
-    store %prevent_dce, %5
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %7:void = call %subgroupBallot_7e6d0e
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBallot
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl
index 5b5d7df..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/07e2d8.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_07e2d8 = func():void {
-  $B2: {
-    %arg_0:ptr<function, f16, read_write> = var, 1.0h
-    %4:f16 = load %arg_0
-    %5:f16 = subgroupBroadcast %4, 1u
-    %res:ptr<function, f16, read_write> = var, %5
-    %7:f16 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_07e2d8
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/08beca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/08beca.wgsl.expected.ir.msl
index 379fa27..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/08beca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/08beca.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_08beca = func():void {
-  $B2: {
-    %arg_0:ptr<function, f32, read_write> = var, 1.0f
-    %4:f32 = load %arg_0
-    %5:f32 = subgroupBroadcast %4, 1u
-    %res:ptr<function, f32, read_write> = var, %5
-    %7:f32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_08beca
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl
index 170bb64..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/0f44e2.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_0f44e2 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
-    %4:vec4<f16> = load %arg_0
-    %5:vec4<f16> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec4<f16>, read_write> = var, %5
-    %7:vec4<f16> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_0f44e2
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/13f36c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/13f36c.wgsl.expected.ir.msl
index d9cba9e..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/13f36c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/13f36c.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_13f36c = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
-    %4:vec2<f16> = load %arg_0
-    %5:vec2<f16> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec2<f16>, read_write> = var, %5
-    %7:vec2<f16> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_13f36c
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl
index 844ebfd..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/1d79c7.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_1d79c7 = func():void {
-  $B2: {
-    %arg_0:ptr<function, i32, read_write> = var, 1i
-    %4:i32 = load %arg_0
-    %5:i32 = subgroupBroadcast %4, 1u
-    %res:ptr<function, i32, read_write> = var, %5
-    %7:i32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_1d79c7
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/279027.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/279027.wgsl.expected.ir.msl
index aac624f..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/279027.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/279027.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_279027 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
-    %4:vec4<u32> = load %arg_0
-    %5:vec4<u32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec4<u32>, read_write> = var, %5
-    %7:vec4<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_279027
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl
index 0ad39ef..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/34fa3d.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_34fa3d = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
-    %4:vec3<u32> = load %arg_0
-    %5:vec3<u32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_34fa3d
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/3e6879.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/3e6879.wgsl.expected.ir.msl
index 4a15724..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/3e6879.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/3e6879.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_3e6879 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
-    %4:vec2<i32> = load %arg_0
-    %5:vec2<i32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec2<i32>, read_write> = var, %5
-    %7:vec2<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_3e6879
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl
index aac9e92..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/41e5d7.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_41e5d7 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
-    %4:vec3<f16> = load %arg_0
-    %5:vec3<f16> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec3<f16>, read_write> = var, %5
-    %7:vec3<f16> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_41e5d7
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/4a4334.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/4a4334.wgsl.expected.ir.msl
index 84907de..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/4a4334.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/4a4334.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_4a4334 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
-    %4:vec2<u32> = load %arg_0
-    %5:vec2<u32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_4a4334
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/5196c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/5196c8.wgsl.expected.ir.msl
index 8ac7365..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/5196c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/5196c8.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_5196c8 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
-    %4:vec2<f32> = load %arg_0
-    %5:vec2<f32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec2<f32>, read_write> = var, %5
-    %7:vec2<f32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_5196c8
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/912ff5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/912ff5.wgsl.expected.ir.msl
index 5881aad..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/912ff5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/912ff5.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_912ff5 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
-    %4:vec3<f32> = load %arg_0
-    %5:vec3<f32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec3<f32>, read_write> = var, %5
-    %7:vec3<f32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_912ff5
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl
index be4e672..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/b7e93b.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_b7e93b = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
-    %4:vec4<f32> = load %arg_0
-    %5:vec4<f32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec4<f32>, read_write> = var, %5
-    %7:vec4<f32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_b7e93b
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl
index ce1b390..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/c36fe1.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_c36fe1 = func():void {
-  $B2: {
-    %arg_0:ptr<function, u32, read_write> = var, 1u
-    %4:u32 = load %arg_0
-    %5:u32 = subgroupBroadcast %4, 1u
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_c36fe1
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/e275c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/e275c8.wgsl.expected.ir.msl
index b243846..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/e275c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/e275c8.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_e275c8 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
-    %4:vec3<i32> = load %arg_0
-    %5:vec3<i32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec3<i32>, read_write> = var, %5
-    %7:vec3<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_e275c8
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/subgroupBroadcast/f637f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBroadcast/f637f9.wgsl.expected.ir.msl
index 2dda944..a4963e5 100644
--- a/test/tint/builtins/gen/var/subgroupBroadcast/f637f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBroadcast/f637f9.wgsl.expected.ir.msl
@@ -1,28 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%subgroupBroadcast_f637f9 = func():void {
-  $B2: {
-    %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
-    %4:vec4<i32> = load %arg_0
-    %5:vec4<i32> = subgroupBroadcast %4, 1u
-    %res:ptr<function, vec4<i32>, read_write> = var, %5
-    %7:vec4<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B3: {
-    %9:void = call %subgroupBroadcast_f637f9
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: subgroupBroadcast
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl
index 169fd2a..29d7b71 100644
--- a/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00229f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00229f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl
index 4c5110c..bebdffc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00348c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_00348c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/01e21e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/01e21e.wgsl.expected.ir.msl
index 4187415..24d27ae 100644
--- a/test/tint/builtins/gen/var/textureDimensions/01e21e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/01e21e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_01e21e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01e21e(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01e21e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_01e21e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/01edb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/01edb1.wgsl.expected.ir.msl
index cf02e70..a588700 100644
--- a/test/tint/builtins/gen/var/textureDimensions/01edb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/01edb1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_01edb1(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01edb1(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_01edb1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_01edb1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.ir.msl
index f45e47c..c613401 100644
--- a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_022903(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_022903(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl
index f7562e0..81aaa7c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_0276ec(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0276ec(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0276ec(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0276ec(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl
index 29559d9..2657fea 100644
--- a/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_029589(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_029589(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_029589(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_029589(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0329b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0329b0.wgsl.expected.ir.msl
index 318ca0f..a670692 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0329b0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0329b0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0329b0(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0329b0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/033195.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/033195.wgsl.expected.ir.msl
index 320e3b7..254b69a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/033195.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/033195.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_033195(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033195(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033195(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_033195(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/033ea7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/033ea7.wgsl.expected.ir.msl
index 3d452ab..c86db2f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/033ea7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/033ea7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033ea7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_033ea7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/038847.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/038847.wgsl.expected.ir.msl
index 4bba64f..b68d9cb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/038847.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/038847.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_038847(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_038847(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_038847(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_038847(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl
index 159f4cc..fdb8210 100644
--- a/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_03f81e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_03f81e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_03f81e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_03f81e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl
index 576e574..bf5796f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_07f1ba(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_07f1ba(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl
index 00a16dd..36bee98 100644
--- a/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_088918(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_088918(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl
index ab24143..031e941 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0890c6(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0890c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl
index addf0b1..c99d4b4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_08e371(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_08e371(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.ir.msl
index d292979..ac6d97e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_09140b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_09140b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_09140b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_09140b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl
index b58802a..2935fb0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_0973c9(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0973c9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0973c9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0973c9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl
index fbd7cac..8f2693a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_0baa0d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0baa0d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0baa0d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0baa0d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.ir.msl
index c674b4b..35ddbdf 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_0c0b0c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0c0b0c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0c0b0c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0c0b0c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl
index f233860..8118da9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0d4a7c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0d4a7c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl
index e74c173..361bf5c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_0de70c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0de70c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0de70c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_0de70c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl
index 9e97fbb..e8b45bb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0ff9a4(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_0ff9a4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl
index 5af8a09..eafde47 100644
--- a/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_135176(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_135176(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl
index e8ed79a..81cd12a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_13f8db(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_13f8db(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl
index abd2b98..1663c42 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_1417dd(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1417dd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1417dd(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_1417dd(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl
index ae7eefa..3636748 100644
--- a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_15aa17(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15aa17(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15aa17(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_15aa17(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl
index f00f7ed..0b0ab0e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15b577(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_15b577(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl
index 5835676..3099d88 100644
--- a/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_18160d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18160d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18160d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_18160d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl
index 5ef22a3..ba0f617 100644
--- a/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_18f19f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18f19f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_18f19f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_18f19f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl
index 4cdb058..334dbb1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1a2be7(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1a2be7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl
index 757cfea..3fd61ac 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1b720f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1b720f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl
index 56ac4ae..601e4fc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bc428(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bc428(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl
index fe9a581..2f21e82 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bd78c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1bd78c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl
index c012411..acdc94a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_1e4024(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1e4024(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_1e4024(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_1e4024(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl
index c4a8adc..5ca429c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_20eaad(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20eaad(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20eaad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_20eaad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/20ecef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/20ecef.wgsl.expected.ir.msl
index 049363a..1ef6ae3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/20ecef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/20ecef.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_20ecef(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20ecef(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_20ecef(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_20ecef(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/212362.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/212362.wgsl.expected.ir.msl
index c63144d..ff479c9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/212362.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/212362.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_212362(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_212362(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl
index f9133ae..1287d89 100644
--- a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_224113(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_224113(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_224113(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_224113(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl
index 3a0e899..d053770 100644
--- a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_22b5b6(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_22b5b6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl
index 8c37cc5..d6d85c5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_24db07(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_24db07(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl
index fd936e9..26f2ffe 100644
--- a/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_25d284(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_25d284(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_25d284(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_25d284(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl
index 8b2d96e..2168dd3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_2674d8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2674d8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2674d8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_2674d8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl
index bf453bd..1d1c3d6 100644
--- a/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_268ddb(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_268ddb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.ir.msl
index 985ebc2..870d39d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_26d6bf(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_26d6bf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl
index bc1bc9e..3b2c363 100644
--- a/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_282978(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_282978(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_282978(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_282978(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/283b58.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/283b58.wgsl.expected.ir.msl
index 96ad3b5..99b24ae 100644
--- a/test/tint/builtins/gen/var/textureDimensions/283b58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/283b58.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_283b58(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_283b58(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_283b58(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_283b58(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/284c27.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/284c27.wgsl.expected.ir.msl
index f040e99..c58b410 100644
--- a/test/tint/builtins/gen/var/textureDimensions/284c27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/284c27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_284c27(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_284c27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl
index 24f378f..9c1f14b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_2a58b7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2a58b7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2a58b7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_2a58b7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2bafdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2bafdf.wgsl.expected.ir.msl
index de002eb..066fa2f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2bafdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2bafdf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2bafdf(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2bafdf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/2dc5c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2dc5c5.wgsl.expected.ir.msl
index 1d9387c..2a362b5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2dc5c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2dc5c5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2dc5c5(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2dc5c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl
index 272ee16..0604502 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2e443d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2e443d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl
index 48a0150..d5c5cf7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2fd2a4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2fd2a4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl
index 3ca2b85..b0a9f88 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2ff32a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_2ff32a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl
index 6b066c9..8a66e26 100644
--- a/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_305dd5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_305dd5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl
index 885bd20..38591cf 100644
--- a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_31799c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31799c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31799c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_31799c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl
index 91c855b..f33038b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_31d00d(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31d00d(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_31d00d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_31d00d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl
index 3474616..efb9edd 100644
--- a/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_325338(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_325338(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_325338(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_325338(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl
index b2cdce7..19dc67c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_346fee(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_346fee(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl
index 8dee991..c108466 100644
--- a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_35a7e5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35a7e5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35a7e5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_35a7e5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl
index df944b0..71931d5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_35ee69(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35ee69(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_35ee69(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_35ee69(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl
index e80d0e0..4c4d3c6 100644
--- a/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_36eeb7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_36eeb7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_36eeb7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_36eeb7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl
index e5e40c7..e15f4ba 100644
--- a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_378a65(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_378a65(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_378a65(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_378a65(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl
index ef56bb2..da71701 100644
--- a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_382b16(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_382b16(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl
index 0e81a4d..ead2027 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_3834f8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3834f8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3834f8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3834f8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl
index f27eb36..2b81f43 100644
--- a/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_38c9ca(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_38c9ca(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_38c9ca(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_38c9ca(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl
index 314e17a..bb3a75c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3963d0(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3963d0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl
index 709cf3f..35dd9f9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_397dab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_397dab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl
index 05fb655..fed6d1c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_3a5bb1(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a5bb1(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a5bb1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3a5bb1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl
index 4f79258..b530d91 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_3a7b69(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a7b69(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3a7b69(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3a7b69(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.ir.msl
index 1395305..ce16c57 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_3af3e7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3af3e7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3af3e7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3af3e7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl
index 5c47a5f..50d9704 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3b38f6(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3b38f6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl
index 78d634d..10cfce9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_3baab5(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3baab5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3baab5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3baab5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl
index 2abbe2d..156005e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_3bf12a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3bf12a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3bf12a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_3bf12a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl
index 34e3f90..2107ff2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3c66f0(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3c66f0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl
index c0a98d9..55f437a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3f3474(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3f3474(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl
index 0fce4e1..abe0a8d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3fc3dc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3fc3dc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl
index 4383008..f995f40 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3ff0a5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_3ff0a5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl
index 2fd05be..75102f5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_40c671(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40c671(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40c671(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_40c671(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl
index 78650dd9..a4196fe 100644
--- a/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40da20(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40da20(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl
index 2f8d38e..3783923 100644
--- a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_40ecf4(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40ecf4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_40ecf4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_40ecf4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl
index df58404..ddc15a3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_41545f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_41545f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_41545f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_41545f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl
index be77074..4d2733a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_423519(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_423519(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl
index 176e644..2726bd8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_427f92(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_427f92(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_427f92(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_427f92(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl
index 4d4ffa5..2c0d48b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_439651(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_439651(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_439651(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_439651(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl
index 06aef59..d08cf90 100644
--- a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_445376(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_445376(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl
index 9bc2856..2b72107 100644
--- a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_44b358(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_44b358(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_44b358(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_44b358(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl
index d5a1d1d..cc367e1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_452fc1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_452fc1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_452fc1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_452fc1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl
index f901eaa..826afa4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_46f0fc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_46f0fc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl
index d5df6de..8f02f6c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4716a4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4716a4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl
index 2a314cc..2107e97 100644
--- a/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_475c10(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_475c10(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl
index 62ce039..c4b6984 100644
--- a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_49a067(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_49a067(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl
index 830fc76..41b13b5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_4acec7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4acec7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4acec7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4acec7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl
index 0a68cdf..e4dcf7e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_4b26ef(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4b26ef(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4b26ef(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4b26ef(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl
index 437a6b4..c0d1713 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4be71b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4be71b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl
index e7a2f30..ef8870f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d1f71(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d1f71(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl
index 051bea1..a54fac6 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_4d27b3(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d27b3(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4d27b3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4d27b3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl
index 11c0968..239179a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_4df14c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4df14c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4df14c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4df14c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4e540a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4e540a.wgsl.expected.ir.msl
index 886f1f4..7318b28 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4e540a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4e540a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_4e540a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4e540a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_4e540a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_4e540a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl
index 954baef..d4224d7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_528c0e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_528c0e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl
index ecf6389..4ddad09 100644
--- a/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_52cf60(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_52cf60(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl
index 964c4ed..e51f3e0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_534ef8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_534ef8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/542c62.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/542c62.wgsl.expected.ir.msl
index 9425fde..30367a0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/542c62.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/542c62.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_542c62(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_542c62(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_542c62(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_542c62(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl
index f00f2cf..4f4f478 100644
--- a/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_55fdeb(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_55fdeb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_55fdeb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_55fdeb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5703b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/5703b3.wgsl.expected.ir.msl
index a83ba12..1fb7a14 100644
--- a/test/tint/builtins/gen/var/textureDimensions/5703b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/5703b3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_5703b3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5703b3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5703b3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_5703b3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl
index 335fa7a..a1a81e5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_578e75(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_578e75(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_578e75(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_578e75(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl
index 1b63586..2f5010e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_579eee(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_579eee(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_579eee(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_579eee(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.ir.msl
index bbabd7c..ebe9e00 100644
--- a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_58a82d(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_58a82d(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_58a82d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_58a82d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl
index 353232b..2a5c318 100644
--- a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_591981(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_591981(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_591981(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_591981(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl
index 89d3b70..2c25b47 100644
--- a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_599ab5(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_599ab5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_599ab5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_599ab5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl
index 3d85686..b5e53c1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_5b4b10(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5b4b10(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5b4b10(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_5b4b10(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.ir.msl
index 6a52169..e00b0ff 100644
--- a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5df042(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_5df042(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.ir.msl
index f2ce1e9..63be980 100644
--- a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_607979(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_607979(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_607979(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_607979(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl
index b0fbd56..335e985 100644
--- a/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_609d34(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_609d34(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl
index 34c72fd..7cb7d97 100644
--- a/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_617dc8(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_617dc8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_617dc8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_617dc8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl
index 787fd75..a598afa 100644
--- a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62cb5a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62cb5a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl
index ac84d5e..043783a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62e7ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_62e7ae(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl
index c26950e..77c04de 100644
--- a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_64dc74(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_64dc74(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl
index 7d105bd..0b33489 100644
--- a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_674058(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_674058(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_674058(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_674058(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl
index f54e078..d932490 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dae40(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dae40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl
index 0468fc9..0251c8d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dbef4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6dbef4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl
index 600134c..8d8e88b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e6c7a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e6c7a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl
index 5ab98eb..cd0a0b7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e72c5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6e72c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl
index 722f1a8..2439df8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6f1b5d(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_6f1b5d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/709357.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/709357.wgsl.expected.ir.msl
index 5bcf9d6..87f8bb3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/709357.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/709357.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_709357(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_709357(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl
index 1b7e2ca..7e530e8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_70dd33(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_70dd33(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_70dd33(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_70dd33(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl
index d7f63c7..b8a42a3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_715917(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_715917(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_715917(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_715917(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.ir.msl
index ed8c823..dd8c0d9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_7228de(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7228de(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7228de(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_7228de(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl
index f18b128..f58592b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7327fa(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7327fa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/740e7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/740e7c.wgsl.expected.ir.msl
index 0ed5bd2..7d6fc20 100644
--- a/test/tint/builtins/gen/var/textureDimensions/740e7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/740e7c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_740e7c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_740e7c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_740e7c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_740e7c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl
index 133a84b..8731430 100644
--- a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756031(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756031(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl
index 8e7dd0c..9b06a7e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_756304(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756304(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_756304(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_756304(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl
index 4e4aca3..2e12906 100644
--- a/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_790e57(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_790e57(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl
index 9fd5199..479a000 100644
--- a/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_795fbb(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_795fbb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_795fbb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_795fbb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/797c30.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/797c30.wgsl.expected.ir.msl
index 9c2d7eb..c553e5d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/797c30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/797c30.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_797c30(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_797c30(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl
index fe722ac..fbfbb2c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_79d168(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_79d168(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl
index 87080d8..36c3645 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a3890(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a3890(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl
index ff4d31a..17205e5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a9e30(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7a9e30(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c753b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7c753b.wgsl.expected.ir.msl
index b04cd2b..db4d79e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7c753b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7c753b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c753b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c753b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl
index d4f8d50..9695e7e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_7c7c64(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c7c64(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7c7c64(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_7c7c64(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7d8439.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7d8439.wgsl.expected.ir.msl
index 8680939..0996aec 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7d8439.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7d8439.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7d8439(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7d8439(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl
index 607fd6c..610e69e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_7ea4b5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7ea4b5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7ea4b5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_7ea4b5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl
index c89d489..79978c2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7edb05(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_7edb05(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl
index 1e28b2d..f9c8507 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8057cb(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8057cb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl
index 5f447c0..ecf648b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_8243a1(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8243a1(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8243a1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8243a1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl
index 9a2c4c2..2e89dd5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_835f90(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_835f90(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_835f90(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_835f90(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/841ebe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/841ebe.wgsl.expected.ir.msl
index 818e084..7b80f46 100644
--- a/test/tint/builtins/gen/var/textureDimensions/841ebe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/841ebe.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_841ebe(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_841ebe(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/84f363.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/84f363.wgsl.expected.ir.msl
index b7257e0..9577f10 100644
--- a/test/tint/builtins/gen/var/textureDimensions/84f363.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/84f363.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_84f363(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_84f363(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_84f363(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_84f363(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl
index af73735..30c602f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_867ead(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_867ead(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_867ead(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_867ead(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl
index 515bbd9..040ca2d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_879b73(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_879b73(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl
index 501acb4..0a27bdd 100644
--- a/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_87b42d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_87b42d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl
index 8bd64d8..017cb3e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_881dd4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_881dd4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a2b17.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8a2b17.wgsl.expected.ir.msl
index 311386c..21bbe1e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8a2b17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8a2b17.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_8a2b17(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a2b17(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a2b17(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8a2b17(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl
index 949efab..c211043 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_8a35f9(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a35f9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8a35f9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8a35f9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl
index 9261755..1748306 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8af728(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8af728(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl
index 75c916f..daa33cf 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_8b9906(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8b9906(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8b9906(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8b9906(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl
index 3ccb435..c0b8a1a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_8bd369(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8bd369(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8bd369(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8bd369(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl
index 8e26008..9ee3fde 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e15f4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e15f4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/8e5de6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8e5de6.wgsl.expected.ir.msl
index 136c9f1..207a9de 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8e5de6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8e5de6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e5de6(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8e5de6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.ir.msl
index e25a363..390bfd7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_8efd47(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8efd47(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_8efd47(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_8efd47(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl
index 19e21a0..7e6cdd6 100644
--- a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_902179(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_902179(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_902179(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_902179(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl
index 959b89b..53c0d7a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_904b0f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_904b0f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl
index 9bf0cba..02532a7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_90dd74(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_90dd74(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_90dd74(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_90dd74(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl
index 1c715d5..8993313 100644
--- a/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_91e3b4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_91e3b4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_91e3b4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_91e3b4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.ir.msl
index 9c988d0..ac4a13f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_920006(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_920006(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.ir.msl
index 87cf5a2..d96c39f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_92552e(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_92552e(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_92552e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_92552e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl
index 4966fe9..1174f2c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_9573f3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9573f3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9573f3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_9573f3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.ir.msl
index 1b24e3b..10b1d00 100644
--- a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_965645(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_965645(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl
index e251473..f7cf713 100644
--- a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_98b2d3(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_98b2d3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl
index 276565b..7fb4101 100644
--- a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_991ea9(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_991ea9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9944d5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9944d5.wgsl.expected.ir.msl
index 0cde3d8..bac3726 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9944d5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9944d5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_9944d5(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9944d5(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9944d5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_9944d5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl
index ae1c3b0..610c27a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b10a0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b10a0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl
index 1b2536a..daf43ec 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b223b(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9b223b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl
index cc6d109..29428fb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9baf27(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9baf27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.ir.msl
index 71fdbd0..87293ed 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9c7a00(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9c7a00(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl
index 2ec1354..a2eda70 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd4ca(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd4ca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl
index 49ef002..217cf7f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_9cd8ad(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd8ad(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9cd8ad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_9cd8ad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl
index 9c75e53..7081902 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d0bac(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d0bac(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9d68b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9d68b8.wgsl.expected.ir.msl
index 248e0f2..48f0d6d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9d68b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9d68b8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d68b8(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9d68b8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl
index 40f97ff..b6ba728 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9dc27a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9dc27a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl
index 9f9adc2..af3dbb3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9e0794(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9e0794(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl
index 2a17e7c..c29d32b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9fcc3b(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_9fcc3b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl
index 67fb339..c8dc251 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_a105a5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a105a5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a105a5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a105a5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl
index d5e7fb8..edfe9af 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_a14386(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a14386(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a14386(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a14386(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl
index 00bf709..9576f27 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a1598a(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a1598a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl
index 3299d92..58a928a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_a20ba2(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a20ba2(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a20ba2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a20ba2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl
index 8dd142b..83d33b3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a25d9b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a25d9b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl
index 949bbec..03dcff0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a2ba5e(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a2ba5e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl
index 4b8bf08..4e72a44 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a3ea91(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a3ea91(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl
index 13d4b1a..b8c84ac 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a48049(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a48049(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl
index a95d568..2d37ee3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a4cd56(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a4cd56(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl
index 602e12e..f84a010 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a65776(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a65776(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7ae4c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a7ae4c.wgsl.expected.ir.msl
index 4dae4aa..8f39845 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a7ae4c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a7ae4c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_a7ae4c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a7ae4c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_a7ae4c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_a7ae4c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl
index b379488..b5f0af5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_aa4353(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aa4353(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aa4353(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_aa4353(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.ir.msl
index f8da143..5693890 100644
--- a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aac604(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_aac604(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.ir.msl
index 36db987..3913658 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_ad7d3b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ad7d3b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ad7d3b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ad7d3b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl
index d3942ab..032a549 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_ae4595(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae4595(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae4595(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ae4595(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ae75a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ae75a7.wgsl.expected.ir.msl
index efaa465..7f46647 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ae75a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ae75a7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_ae75a7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae75a7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ae75a7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ae75a7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl
index 96f184d..bbda3dc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_af46ab(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_af46ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_af46ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_af46ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl
index ba6133b..c62fef1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b16352(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b16352(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b16352(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b16352(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl
index aabfcb7..cac21d2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b284b8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b284b8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b284b8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b284b8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl
index ce41ac0..2b941c1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b3ab5e(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b3ab5e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.ir.msl
index 76ca292..8a96eff 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b46d97(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b46d97(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.ir.msl
index d0167b5..bab5c24 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_b51345(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b51345(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b51345(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b51345(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl
index 17b597f..59b27d3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b56112(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b56112(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/b5ba03.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b5ba03.wgsl.expected.ir.msl
index b0d6cee..a941f84 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b5ba03.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b5ba03.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5ba03(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5ba03(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl
index 49587af..266d4d4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b5d68e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5d68e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b5d68e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b5d68e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl
index 79311e6..6a2a34e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b6bbf4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b6bbf4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl
index d0dc83e..4267d89 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_b8287f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b8287f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b8287f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_b8287f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b9e7ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b9e7ef.wgsl.expected.ir.msl
index ea5c346..9df79e3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b9e7ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b9e7ef.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b9e7ef(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_b9e7ef(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl
index 6720aca..b5ae247 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bb95d9(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bb95d9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl
index 5a56fd0..848bc4e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_bbe285(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bbe285(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bbe285(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_bbe285(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl
index b5c1f1d..5dfb71b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_bc96f6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bc96f6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bc96f6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_bc96f6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl
index 1d75b14..9ff3fc1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bd94c8(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bd94c8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl
index 5e91845..a7a8670 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bec716(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bec716(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl
index 5f67788..ffddf64 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bf9170(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_bf9170(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl
index 038f59d..aad7c5e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1189e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1189e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl
index 9f58cbc..b8a5a97 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_c1dbf6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1dbf6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c1dbf6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c1dbf6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c27466.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c27466.wgsl.expected.ir.msl
index f60a1ca..2632169 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c27466.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c27466.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 uint textureDimensions_c27466(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c27466(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c27466(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c27466(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl
index 47ae448..6a5eefe 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device uint2* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c2cdd3(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c2cdd3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl
index 014db85..089dc08 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_c44fc1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c44fc1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c44fc1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c44fc1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl
index f9f70f3..743f634 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c5a36e(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c5a36e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl
index b773a71..fbdaddb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_c6b44c(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b44c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b44c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c6b44c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c6b985.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c6b985.wgsl.expected.ir.msl
index dadc635..344632d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c6b985.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c6b985.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_c6b985(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b985(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c6b985(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c6b985(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7ea63.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c7ea63.wgsl.expected.ir.msl
index 2e32d73..3dc9b52 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c7ea63.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c7ea63.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_c7ea63(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c7ea63(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c7ea63(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c7ea63(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl
index 0795d5e..71e20ed 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_c82420(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c82420(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c82420(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_c82420(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl
index b1ae88c..51b9dda 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c871f3(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_c871f3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl
index 2b6a7bf..8d4236e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_ca10cc(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ca10cc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ca10cc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ca10cc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl
index 60d4dac..a36c42f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::write> arg_0;
 };
 
 uint2 textureDimensions_cad3b7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cad3b7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cad3b7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_cad3b7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl
index 177d677..21c318d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_cc947b(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cc947b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cc947b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_cc947b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl
index 074e709..890f6a0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cd3033(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cd3033(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl
index 83237be..eabc376 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.msl
@@ -30,10 +30,10 @@
 };
 
 struct tint_module_vars_struct {
+  device uint2* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
-  device uint2* prevent_dce;
 };
 
 struct VertexOutput {
@@ -51,13 +51,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureDimensions_cdc6c9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureDimensions_cdc6c9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/cedabd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cedabd.wgsl.expected.ir.msl
index 05eb342..9986798 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cedabd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cedabd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cedabd(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cedabd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl
index 2cf0da3..7fbb996 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cf2b50(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_cf2b50(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl
index 032f259..e9c8ce8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d0778e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d0778e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.ir.msl
index 841cf97..2722780 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_d08a94(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d08a94(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d08a94(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d08a94(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl
index 04ae53b..5c65808 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_d1b882(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d1b882(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d1b882(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d1b882(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl
index a013701..e530d9b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d3accd(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d3accd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl
index 0de998e..af8b77f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44ac3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44ac3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl
index 8bdff0c..733c713 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44dd1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d44dd1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl
index ccaf2ee..ee1d879 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_d63c28(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d63c28(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d63c28(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d63c28(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl
index d267242..3b2e576 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d6f3cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d6f3cf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl
index d4b24fb..8c7338c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_d8ba68(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8ba68(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8ba68(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d8ba68(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl
index 123280a..91f786a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::write> arg_0;
 };
 
 uint3 textureDimensions_d8f887(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8f887(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_d8f887(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_d8f887(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.ir.msl
index d808108..a7a6239 100644
--- a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_da30d2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_da30d2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_da30d2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_da30d2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl
index 7c16062..189fbf4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_daf0fe(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_daf0fe(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl
index 6a3dc3b..ce4b800 100644
--- a/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_db7131(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_db7131(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl
index 771ea37..0f796c6 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_dc83ce(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dc83ce(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dc83ce(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_dc83ce(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/de03c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/de03c6.wgsl.expected.ir.msl
index 6eb80eb..ab49fd5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/de03c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/de03c6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_de03c6(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_de03c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl
index da3b632..2d61c1f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_deb3c0(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_deb3c0(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_deb3c0(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_deb3c0(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl
index 86eeb37..8f9bd34 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_dee461(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dee461(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dee461(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_dee461(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl
index 73b162f..82dfe99 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dfdc32(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_dfdc32(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.ir.msl
index 9b5e1c8..36d99a7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_e122fe(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e122fe(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e122fe(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e122fe(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl
index b46da20..d9285a3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e18a8b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e18a8b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl
index 74c4ad6..4e69fa2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4bfd2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4bfd2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl
index 8602c04..babaafb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4e310(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4e310(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl
index 4fd95c9..089db84 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_e4f021(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4f021(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e4f021(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e4f021(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl
index 5252185..1bf6d8f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_e50eb8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e50eb8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e50eb8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e50eb8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl
index 6d1df05..62b1b17 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint3* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e5a203(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e5a203(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl
index 1d31264..9a29048 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_e738f4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e738f4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e738f4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e738f4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl
index f807081..16d0da3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_e824b6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e824b6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e824b6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e824b6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl
index 96bcd70..96a8e48 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::write> arg_0;
 };
 
 uint2 textureDimensions_e99308(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e99308(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_e99308(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_e99308(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.ir.msl
index dc74eed..5844403 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::write> arg_0;
 };
 
 uint textureDimensions_ea066c(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea066c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea066c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ea066c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.ir.msl
index 49e4ebc..2cc3ce0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::write> arg_0;
 };
 
 uint textureDimensions_ea25bc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea25bc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ea25bc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ea25bc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl
index 6075232..8b56372 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint2* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eafe19(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eafe19(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl
index 2fd99a6..3fce652 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_eb03b1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb03b1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb03b1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb03b1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl
index 5ff9bf7..3a560ae 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_eb10d6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb10d6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb10d6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb10d6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb1249.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb1249.wgsl.expected.ir.msl
index 3ad1576..30e145d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb1249.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb1249.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint textureDimensions_eb1249(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb1249(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb1249(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb1249(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl
index 1091560..f45c04b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_eb9f4d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb9f4d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_eb9f4d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_eb9f4d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl
index 7418616..7873284 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_ed1030(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ed1030(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ed1030(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ed1030(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl
index d7c4512..db7673a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::write> arg_0;
 };
 
 uint3 textureDimensions_ef2e58(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ef2e58(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_ef2e58(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_ef2e58(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.ir.msl
index 6911066..d7014ad 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f17acd(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f17acd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.ir.msl
index 2ca4970..8c15f8a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::write> arg_0;
 };
 
 uint textureDimensions_f264a3(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f264a3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f264a3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f264a3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl
index c47232e..38a9be2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::write> arg_0;
 };
 
 uint3 textureDimensions_f3a2ac(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f3a2ac(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f3a2ac(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f3a2ac(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f406ff.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f406ff.wgsl.expected.ir.msl
index d30fc12..903ee9e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f406ff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f406ff.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 uint textureDimensions_f406ff(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f406ff(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f406ff(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f406ff(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl
index ba6f2ed..cad5dbb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device uint3* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4321c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4321c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl
index 10addfd..26ece38 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f48886(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f48886(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl
index c343cee..ce02a56 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_f4e469(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4e469(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f4e469(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f4e469(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl
index 1308242..38441f5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_f55a94(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f55a94(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f55a94(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f55a94(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl
index 24c785b..314b506 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f626b3(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f626b3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl
index 02a59cf..ad5bf6e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f7bac5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f7bac5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl
index 88cee53..01325df 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f8522e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f8522e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl
index 78aa098..af1cde5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device uint3* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint3 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 uint3 textureDimensions_f93ece(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f93ece(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f93ece(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f93ece(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_2.pos, .VertexOutput_prevent_dce=v_2.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl
index 169f7c1..6ad8bf1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 uint2 textureDimensions_f94e55(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f94e55(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_f94e55(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_f94e55(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl
index 6625efb..a841b86 100644
--- a/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::write> arg_0;
   device uint2* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint2 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint2 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::write> arg_0;
 };
 
 uint2 textureDimensions_fbb15a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fbb15a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fbb15a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureDimensions_fbb15a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdbae8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/fdbae8.wgsl.expected.ir.msl
index e615c24..2f0479c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/fdbae8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/fdbae8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdbae8(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdbae8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl
index 7a781ff..fb95abf 100644
--- a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint2* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdf6e9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureDimensions_fdf6e9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.ir.msl
index bb989c6..eecf62e 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_0166ec(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_0166ec(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.ir.msl
index 6a12e16..3f33131 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_04fa78(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_04fa78(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.ir.msl
index 8e79aab..53234eb 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_10c554(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_10c554(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.ir.msl
index bf7abb0..9b4811a 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_11b2db(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_11b2db(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.ir.msl
index e784dc4..b31120a 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_17baac(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_17baac(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.ir.msl
index 2714045..7f14172 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_1bf0ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_1bf0ab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.ir.msl
index 033a8d4..c712f76 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_1f7f6b(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_1f7f6b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl
index ba6f4d6..2b8e7ff 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_22e930(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_22e930(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.ir.msl
index 890059c..cbc3ca0 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_238ec4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_238ec4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl
index d6cfa4d..54ab3ff 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_24b0bd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_24b0bd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.ir.msl
index c2d9f4d..24ae400 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_269250(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_269250(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.ir.msl
index 4e9e524..b399b7f 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2a4f40(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2a4f40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl
index 1775b2f..3862593 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_2cc066(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_2cc066(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.ir.msl
index 42d2585..fc96b99 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2e0ed5(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_2e0ed5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.ir.msl
index 957ef3d..57bab95 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_32c4e8(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_32c4e8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.ir.msl
index 92e2985..25783cc 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_3b32cc(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_3b32cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl
index 8463560..bb92945 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_43025d(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_43025d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl
index bc640fd..ef23895 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_445793(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_445793(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.ir.msl
index 218698c..f582c80d 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_49b07f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_49b07f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl
index fa7d96b3..a9b38ec 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4b8103(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4b8103(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.ir.msl
index 2615f07..7647bdf4 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4e8ac5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_4e8ac5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.ir.msl
index feea5dd..a0cb8c0 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5266da(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5266da(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.ir.msl
index 45e5a95..c0c30b6 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_59372a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_59372a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.ir.msl
index 1b345ac..28dacaa 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5ba85f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5ba85f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.ir.msl
index aab41bc..96df993 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5bd491(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_5bd491(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.ir.msl
index 56c362f..ebc2523 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_6b7b74(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_6b7b74(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl
index b597761..3726b9d 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_751f8a(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_751f8a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.ir.msl
index 1ecddf6..d6b91e5 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_788010(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_788010(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.ir.msl
index a1283bf..545aa0c 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_7c3828(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_7c3828(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.ir.msl
index 3057719..ca3e0a2 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_7dd226(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_7dd226(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.ir.msl
index d4bce84..8540ca8 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_829357(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_829357(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl
index b57e75c..6e45514 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_831549(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_831549(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.ir.msl
index d4ee355..0e2ea21 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8578bc(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8578bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.ir.msl
index 91ba606..1de99a5 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_89680f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_89680f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl
index fd62493..5e9adaa 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8b754c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8b754c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.ir.msl
index 66eacea..1b5ab7a 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8fae00(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_8fae00(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl
index 8e36f48..a2563f9 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_92ea47(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_92ea47(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.ir.msl
index e719ba9..51d5cf1 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_986700(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_986700(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl
index 45e63b9..cdda74a 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_9a6358(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_9a6358(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl
index be298d5..59b0571 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_9ab41e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_9ab41e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.ir.msl
index 885b020..a01d92c 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_a0372b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_a0372b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.ir.msl
index 1f9648c..0376abb 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_a68027(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_a68027(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl
index c5fee16..4b0b02b 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_aaf6bd(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_aaf6bd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.ir.msl
index 6217126..23bc68b 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_af55b3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_af55b3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.ir.msl
index 3ff848a..0d85fb6 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bb3ac5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bb3ac5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.ir.msl
index 15dbd0a..d695ab4 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bd33b6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_bd33b6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.ir.msl
index 7fd894b..96167da 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_be276f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_be276f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl
index 43e7b5f..7b721be 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texturecube_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_c0640c(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_c0640c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.ir.msl
index 0ee875b..ae7c982 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ccadde(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ccadde(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.ir.msl
index 6819d03..4d84584 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ce5578(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ce5578(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.ir.msl
index 6c7bacd..d802b0f 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_cf9112(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_cf9112(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl
index ac08d83..5a6300d 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d1f187(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d1f187(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl
index 5869d70..c54bce1 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d4b5c6(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d4b5c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.ir.msl
index be3ada0..74618c9 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d6507c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d6507c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.ir.msl
index 38613bc..d033390 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d8e958(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d8e958(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl
index 3ca9fe4..9b3276f 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_d90605(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGather_d90605(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl
index 6e9c804..f6e376c 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d98d59(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_d98d59(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.ir.msl
index de431ae..e1121f0 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_dc6661(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_dc6661(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.ir.msl
index e8c6e27..88f3efc 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e2acac(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e2acac(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl
index 0816221..43750ef 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texture2d_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e3165f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e3165f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl
index c4d6bf6..c096219 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device int4* prevent_dce;
   texture2d_array<int, access::sample> arg_1;
   sampler arg_2;
-  device int4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e9d390(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_e9d390(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.ir.msl
index 122a28d..e6e8145 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_1;
   sampler arg_2;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ea8eb4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_ea8eb4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl
index ea63c67..32de59e 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device uint4* prevent_dce;
   texturecube_array<uint, access::sample> arg_1;
   sampler arg_2;
-  device uint4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_f2c6e3(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_1=arg_1, .arg_2=arg_2};
   (*tint_module_vars.prevent_dce) = textureGather_f2c6e3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.ir.msl
index 18ec967..ce92f7a 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_144a9a(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_144a9a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.ir.msl
index 2f66ff7..8bfba07 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_182fd4(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_182fd4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.ir.msl
index a14450b..381b611 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_2e409c(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_2e409c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.ir.msl
index 95fa6a7..72d4523 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_313add(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_313add(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
index 907482f..07f16fb 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_60d2d1(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_60d2d1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.ir.msl
index f6a68c2..a306c09 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_6d9352(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_6d9352(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl
index 5340105..ccd80bd 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_783e65(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_783e65(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.ir.msl
index 4761afc..6e9f1fc 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_b5bc43(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_b5bc43(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl
index 90f7a50..2072969 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_f585cc(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureGatherCompare_f585cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/012e11.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/012e11.wgsl.expected.ir.msl
index 7bd8fe5..70c93ff 100644
--- a/test/tint/builtins/gen/var/textureLoad/012e11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/012e11.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_012e11(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_012e11(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_012e11(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_012e11(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.ir.msl
index 73a7450..4fdba0c 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_019da0(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_019da0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/01cd01.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/01cd01.wgsl.expected.ir.msl
index 0a30a30..4893ff6 100644
--- a/test/tint/builtins/gen/var/textureLoad/01cd01.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/01cd01.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_01cd01(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_01cd01(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_01cd01(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_01cd01(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.ir.msl
index d8fbc78..ba690bc 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_026217(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_026217(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/02c48d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/02c48d.wgsl.expected.ir.msl
index 9f93581..f3e46e9 100644
--- a/test/tint/builtins/gen/var/textureLoad/02c48d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/02c48d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_02c48d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02c48d(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02c48d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_02c48d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/02ef1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/02ef1f.wgsl.expected.ir.msl
index a1f4738..e77d805 100644
--- a/test/tint/builtins/gen/var/textureLoad/02ef1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/02ef1f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_02ef1f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02ef1f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_02ef1f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_02ef1f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/03e03e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/03e03e.wgsl.expected.ir.msl
index 7d1456b..ca83e74 100644
--- a/test/tint/builtins/gen/var/textureLoad/03e03e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/03e03e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_03e03e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_03e03e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_03e03e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_03e03e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.ir.msl
index 2d0de50..76ee877 100644
--- a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_045ec9(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_045ec9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.msl
index 2ab68d2..75bfc22 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_04b911(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_04b911(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.ir.msl
index caa93a4..1d69965 100644
--- a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_050c33(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_050c33(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/054350.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/054350.wgsl.expected.ir.msl
index 21f4768..13556e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/054350.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/054350.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_054350(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_054350(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_054350(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_054350(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.ir.msl
index 2d864d2..7682fad 100644
--- a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0674b1(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0674b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.ir.msl
index 51dcd5c..2554a02 100644
--- a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_06ac37(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_06ac37(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.ir.msl
index 12d2488..25065b8 100644
--- a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_072e26(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_072e26(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.ir.msl
index 949e229..3b2d885 100644
--- a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_078bc4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_078bc4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/0b515a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/0b515a.wgsl.expected.ir.msl
index bfe7d22..290568c 100644
--- a/test/tint/builtins/gen/var/textureLoad/0b515a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/0b515a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_0b515a(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0b515a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0b515a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_0b515a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.ir.msl
index b44e42e..168b106 100644
--- a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0cb698(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_0cb698(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.ir.msl
index cebcfb7..106674f 100644
--- a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_10db82(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_10db82(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/126466.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/126466.wgsl.expected.ir.msl
index 850661f..bd82823 100644
--- a/test/tint/builtins/gen/var/textureLoad/126466.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/126466.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_126466(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_126466(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_126466(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_126466(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.ir.msl
index cd90de3..1f4e675 100644
--- a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_127e12(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_127e12(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1373dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1373dc.wgsl.expected.ir.msl
index a43a377..db3b888 100644
--- a/test/tint/builtins/gen/var/textureLoad/1373dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1373dc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1373dc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1373dc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.ir.msl
index ad0f66c..2c0caf2 100644
--- a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13d539(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13d539(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.ir.msl
index f06329f..7931993 100644
--- a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13e90c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_13e90c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.ir.msl
index 1d166a3..6cf3c52 100644
--- a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_143d84(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_143d84(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.ir.msl
index 688c8e7..024e002 100644
--- a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1471b8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1471b8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/14cc4c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/14cc4c.wgsl.expected.ir.msl
index cd94d99..e785aaa 100644
--- a/test/tint/builtins/gen/var/textureLoad/14cc4c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/14cc4c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_14cc4c(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_14cc4c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_14cc4c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_14cc4c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.ir.msl
index 8a28038..18f504f 100644
--- a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1561a7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1561a7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.ir.msl
index e13197c..06e9f12 100644
--- a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_15e675(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_15e675(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1619bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1619bf.wgsl.expected.ir.msl
index 5475423..d234c1c 100644
--- a/test/tint/builtins/gen/var/textureLoad/1619bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1619bf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_1619bf(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1619bf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1619bf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1619bf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.ir.msl
index ce213cb..c8a5adf 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_168dc8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_168dc8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/170593.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/170593.wgsl.expected.ir.msl
index 5be209a..c5a0e0c 100644
--- a/test/tint/builtins/gen/var/textureLoad/170593.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/170593.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_170593(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_170593(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_170593(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_170593(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/17095b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/17095b.wgsl.expected.ir.msl
index 2af4d7a..7ec83be 100644
--- a/test/tint/builtins/gen/var/textureLoad/17095b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/17095b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_17095b(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_17095b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_17095b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_17095b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.ir.msl
index fc79020..79e8d19 100644
--- a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_18ac11(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_18ac11(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.msl
index b5d56d9..506401e 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19cf87(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19cf87(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/19d6be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/19d6be.wgsl.expected.ir.msl
index 2acd388..6d80001 100644
--- a/test/tint/builtins/gen/var/textureLoad/19d6be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/19d6be.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_19d6be(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19d6be(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19d6be(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_19d6be(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/19e5ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/19e5ca.wgsl.expected.ir.msl
index 23d3836..0573e6b 100644
--- a/test/tint/builtins/gen/var/textureLoad/19e5ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/19e5ca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19e5ca(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_19e5ca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.ir.msl
index b826292..cf9a9da 100644
--- a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a062f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a062f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.ir.msl
index 7e66844..eb2de8b 100644
--- a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a8452(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1a8452(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.ir.msl
index 79c9418..75ba19a 100644
--- a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1aa950(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1aa950(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.ir.msl
index 45fdf84..b9d5bad 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b051f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b051f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1b4332.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1b4332.wgsl.expected.ir.msl
index 4cbd20c..8bc9298 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b4332.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1b4332.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_1b4332(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b4332(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b4332(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1b4332(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/1b8588.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1b8588.wgsl.expected.ir.msl
index a7d28b7..01ace26 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b8588.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1b8588.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b8588(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1b8588(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1bc5ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1bc5ab.wgsl.expected.ir.msl
index aea0244..2e9505b 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bc5ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1bc5ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_1bc5ab(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1bc5ab(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1bc5ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1bc5ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
index 7da8068..ffbe539 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
@@ -30,10 +30,10 @@
 };
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -84,13 +84,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_1bfdfb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_1bfdfb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.ir.msl
index b801043..8e839a5 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1c562a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1c562a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1d43ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1d43ae.wgsl.expected.ir.msl
index 676cca6..9203002 100644
--- a/test/tint/builtins/gen/var/textureLoad/1d43ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1d43ae.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_1d43ae(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1d43ae(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1d43ae(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1d43ae(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/1e6baa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1e6baa.wgsl.expected.ir.msl
index 128532c..5cc83c7 100644
--- a/test/tint/builtins/gen/var/textureLoad/1e6baa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1e6baa.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_1e6baa(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1e6baa(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1e6baa(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1e6baa(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.ir.msl
index 9c4cae5..3557363 100644
--- a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1eb93f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1eb93f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.ir.msl
index 8687e89..b3d2b07 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1f2016(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1f2016(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/1fde63.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1fde63.wgsl.expected.ir.msl
index b822b31..416942b 100644
--- a/test/tint/builtins/gen/var/textureLoad/1fde63.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1fde63.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_1fde63(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1fde63(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_1fde63(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_1fde63(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.ir.msl
index 4d61530..945f2f1 100644
--- a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_206a08(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_206a08(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.ir.msl
index f6339e9..cd0113f 100644
--- a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_20fa2f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_20fa2f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/216c37.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/216c37.wgsl.expected.ir.msl
index 213ce60..2c75779 100644
--- a/test/tint/builtins/gen/var/textureLoad/216c37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/216c37.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_216c37(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_216c37(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.ir.msl
index de35024..2846c5b 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_21d1c4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_21d1c4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.ir.msl
index 8bc1190..0cef1aa 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_223246(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_223246(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.ir.msl
index 14583b4..a9f8420 100644
--- a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_22e963(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_22e963(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.ir.msl
index 52ce797..324d5aa 100644
--- a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23007a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23007a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.ir.msl
index 2cd776d..cb14adf 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2363be(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2363be(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.ir.msl
index 6c65b02..cdb3304 100644
--- a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23ff89(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_23ff89(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/25b67f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/25b67f.wgsl.expected.ir.msl
index a192173..aabec76 100644
--- a/test/tint/builtins/gen/var/textureLoad/25b67f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/25b67f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_25b67f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_25b67f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_25b67f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_25b67f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/26b8f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/26b8f6.wgsl.expected.ir.msl
index a5fd51a..b45c3fc 100644
--- a/test/tint/builtins/gen/var/textureLoad/26b8f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/26b8f6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_26b8f6(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26b8f6(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26b8f6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_26b8f6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.ir.msl
index 38455fb..4f62ce9 100644
--- a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26c4f8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26c4f8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.ir.msl
index 4426fe2..8dc5d18 100644
--- a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26d7f1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_26d7f1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/272e7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/272e7a.wgsl.expected.ir.msl
index a7c0b89..c5f3efb 100644
--- a/test/tint/builtins/gen/var/textureLoad/272e7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/272e7a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_272e7a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_272e7a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_272e7a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_272e7a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/276643.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/276643.wgsl.expected.ir.msl
index 3a467ee..5671ad9 100644
--- a/test/tint/builtins/gen/var/textureLoad/276643.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/276643.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276643(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276643(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.ir.msl
index f7a00f7..3b8359c 100644
--- a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276a2c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_276a2c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.ir.msl
index 9a90251..f4639c3 100644
--- a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2887d7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2887d7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.ir.msl
index b36a03e..b2906a8 100644
--- a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2a82d9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2a82d9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.ir.msl
index 70ad8d2..766d795 100644
--- a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2ae485(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2ae485(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.ir.msl
index 1ca5874..ec34bbe 100644
--- a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2c72ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2c72ae(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2cee30.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2cee30.wgsl.expected.ir.msl
index 9ef38b0..4849af0 100644
--- a/test/tint/builtins/gen/var/textureLoad/2cee30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2cee30.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_2cee30(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2cee30(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2cee30(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_2cee30(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.ir.msl
index 127d454..eec55db 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d479c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d479c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.ir.msl
index 8c0306a..148d31a 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d6cf7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2d6cf7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2dbfc2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2dbfc2.wgsl.expected.ir.msl
index 2904ee1..946d9a8 100644
--- a/test/tint/builtins/gen/var/textureLoad/2dbfc2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2dbfc2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_2dbfc2(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2dbfc2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2dbfc2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_2dbfc2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.ir.msl
index df0ee4b..dbe3523 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e09aa(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e09aa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.ir.msl
index 0882baf..cd0585d 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e3552(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2e3552(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/2eaf31.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/2eaf31.wgsl.expected.ir.msl
index 6a23f81..20353c2 100644
--- a/test/tint/builtins/gen/var/textureLoad/2eaf31.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2eaf31.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_2eaf31(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2eaf31(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_2eaf31(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_2eaf31(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.ir.msl
index 2999dd4..143a0f6 100644
--- a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_313c73(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_313c73(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.ir.msl
index c8a7153..2a06aa3 100644
--- a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_31db4b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_31db4b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.ir.msl
index dfe3cf5..fcadce4 100644
--- a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_321210(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_321210(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/32a7b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/32a7b8.wgsl.expected.ir.msl
index 2d6d32a..ac08589 100644
--- a/test/tint/builtins/gen/var/textureLoad/32a7b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/32a7b8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_32a7b8(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_32a7b8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_32a7b8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_32a7b8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.ir.msl
index fc8ef8e..8facdb9 100644
--- a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_33d3aa(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_33d3aa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.ir.msl
index 05b59ad..33598da 100644
--- a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_348827(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_348827(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/34d97c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/34d97c.wgsl.expected.ir.msl
index 8f1d668..aa295e8 100644
--- a/test/tint/builtins/gen/var/textureLoad/34d97c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/34d97c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_34d97c(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_34d97c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_34d97c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_34d97c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/35a5e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/35a5e2.wgsl.expected.ir.msl
index e0439e16..24f2f04 100644
--- a/test/tint/builtins/gen/var/textureLoad/35a5e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/35a5e2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_35a5e2(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35a5e2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35a5e2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_35a5e2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/35d464.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/35d464.wgsl.expected.ir.msl
index adea9ee..a987697 100644
--- a/test/tint/builtins/gen/var/textureLoad/35d464.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/35d464.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35d464(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_35d464(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.msl
index 4b90df8..2995574 100644
--- a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_374351(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_374351(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.ir.msl
index 5209a0c..a5f9b79 100644
--- a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_388688(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_388688(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.ir.msl
index 90864c1..0c13a92 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_38f8ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_38f8ab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/39016c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/39016c.wgsl.expected.ir.msl
index d0939ec..4871f73 100644
--- a/test/tint/builtins/gen/var/textureLoad/39016c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/39016c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_39016c(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39016c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39016c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_39016c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/395447.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/395447.wgsl.expected.ir.msl
index dd373c9..b367aa0 100644
--- a/test/tint/builtins/gen/var/textureLoad/395447.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/395447.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_395447(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_395447(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_395447(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_395447(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.ir.msl
index 024b919..f33d681 100644
--- a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39ef40(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_39ef40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3a2350.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3a2350.wgsl.expected.ir.msl
index a53f40d..b0e1dcb 100644
--- a/test/tint/builtins/gen/var/textureLoad/3a2350.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3a2350.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_3a2350(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3a2350(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3a2350(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3a2350(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/3aea13.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3aea13.wgsl.expected.ir.msl
index bdd307b..c66998e 100644
--- a/test/tint/builtins/gen/var/textureLoad/3aea13.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3aea13.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_3aea13(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3aea13(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3aea13(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3aea13(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/3bbc2b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3bbc2b.wgsl.expected.ir.msl
index 6de743e..f2fca79 100644
--- a/test/tint/builtins/gen/var/textureLoad/3bbc2b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3bbc2b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_3bbc2b(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3bbc2b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3bbc2b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3bbc2b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.ir.msl
index 6b72545..c7fcec2 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c0d9e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c0d9e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.ir.msl
index 8198ed8..7f1e93f 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c9587(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c9587(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.ir.msl
index dc7e914..c43259f 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c96e8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3c96e8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3cfb9c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3cfb9c.wgsl.expected.ir.msl
index e404562..cfc3580 100644
--- a/test/tint/builtins/gen/var/textureLoad/3cfb9c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3cfb9c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_3cfb9c(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3cfb9c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3cfb9c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3cfb9c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.ir.msl
index a7ba3f9..b245cef 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d001b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d001b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.ir.msl
index fc4b866..4b941ee 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d3fd1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d3fd1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.ir.msl
index d112105..be08166 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d9c90(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3d9c90(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3da3ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3da3ed.wgsl.expected.ir.msl
index 417e6ab..b7cb779 100644
--- a/test/tint/builtins/gen/var/textureLoad/3da3ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3da3ed.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3da3ed(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3da3ed(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/3e16a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3e16a8.wgsl.expected.ir.msl
index 1c8c419..50b1ba6 100644
--- a/test/tint/builtins/gen/var/textureLoad/3e16a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3e16a8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_3e16a8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e16a8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e16a8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_3e16a8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.ir.msl
index 9109457..9326f03 100644
--- a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e5f6a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_3e5f6a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/40ee8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/40ee8b.wgsl.expected.ir.msl
index e8fc2e4..b7f5a59 100644
--- a/test/tint/builtins/gen/var/textureLoad/40ee8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/40ee8b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_40ee8b(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_40ee8b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_40ee8b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_40ee8b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4212a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4212a1.wgsl.expected.ir.msl
index 4b9f94b..3996eb0 100644
--- a/test/tint/builtins/gen/var/textureLoad/4212a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4212a1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_4212a1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4212a1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4212a1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4212a1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/424afd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/424afd.wgsl.expected.ir.msl
index ea11b09..d96aa32 100644
--- a/test/tint/builtins/gen/var/textureLoad/424afd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/424afd.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_424afd(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_424afd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_424afd(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_424afd(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/42a631.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/42a631.wgsl.expected.ir.msl
index 5cd9e45..cf9762c 100644
--- a/test/tint/builtins/gen/var/textureLoad/42a631.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/42a631.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_42a631(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_42a631(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_42a631(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_42a631(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/43484a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/43484a.wgsl.expected.ir.msl
index ea1f964..235797b 100644
--- a/test/tint/builtins/gen/var/textureLoad/43484a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/43484a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_43484a(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43484a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43484a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_43484a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.ir.msl
index 6e692a8..612be09 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_439e2a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_439e2a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/43cd86.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/43cd86.wgsl.expected.ir.msl
index 1a62d87..2dbceb5 100644
--- a/test/tint/builtins/gen/var/textureLoad/43cd86.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/43cd86.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_43cd86(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43cd86(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_43cd86(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_43cd86(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.ir.msl
index 3607e37..82f33c3 100644
--- a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_44c826(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_44c826(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4542ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4542ae.wgsl.expected.ir.msl
index ab86b57..a054cba 100644
--- a/test/tint/builtins/gen/var/textureLoad/4542ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4542ae.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4542ae(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4542ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4542ae(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4542ae(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.ir.msl
index 05c6dcc..428f199 100644
--- a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_454347(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_454347(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.ir.msl
index 20e0f6b..610936e 100644
--- a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4638a0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4638a0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/469912.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/469912.wgsl.expected.ir.msl
index ac4b714..d171504 100644
--- a/test/tint/builtins/gen/var/textureLoad/469912.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/469912.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_469912(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_469912(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_469912(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_469912(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.ir.msl
index 2c706b8..e2b8ced 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46a93f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46a93f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.ir.msl
index 5082dd2..d28f965 100644
--- a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46dbf5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_46dbf5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/473d3e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/473d3e.wgsl.expected.ir.msl
index 51618cb..04f927a 100644
--- a/test/tint/builtins/gen/var/textureLoad/473d3e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/473d3e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_473d3e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_473d3e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_473d3e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_473d3e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.ir.msl
index 67d1034..8f9c580 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_47e818(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_47e818(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/482627.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/482627.wgsl.expected.ir.msl
index 390c9a0..6f4f1e9 100644
--- a/test/tint/builtins/gen/var/textureLoad/482627.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/482627.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_482627(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_482627(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_482627(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_482627(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.ir.msl
index 107ffc0..765abe7 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_484344(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_484344(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4951bb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4951bb.wgsl.expected.ir.msl
index 942f610..cd4a274 100644
--- a/test/tint/builtins/gen/var/textureLoad/4951bb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4951bb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4951bb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4951bb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.ir.msl
index 0bc6e50..98ce07e 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_49f76f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_49f76f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4a5c55.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4a5c55.wgsl.expected.ir.msl
index 595255b..80979eb 100644
--- a/test/tint/builtins/gen/var/textureLoad/4a5c55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4a5c55.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_4a5c55(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4a5c55(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4a5c55(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4a5c55(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.ir.msl
index 19ad6de..34a0b9a 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4acb64(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4acb64(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4c15b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4c15b2.wgsl.expected.ir.msl
index 073f8df..f88a255 100644
--- a/test/tint/builtins/gen/var/textureLoad/4c15b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4c15b2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4c15b2(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c15b2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c15b2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4c15b2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4c1a1e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4c1a1e.wgsl.expected.ir.msl
index eec360a..35dec90 100644
--- a/test/tint/builtins/gen/var/textureLoad/4c1a1e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4c1a1e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_4c1a1e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c1a1e(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c1a1e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4c1a1e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4c423f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4c423f.wgsl.expected.ir.msl
index 798858a..a250330 100644
--- a/test/tint/builtins/gen/var/textureLoad/4c423f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4c423f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c423f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c423f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.ir.msl
index 910aed7..9c8e24c 100644
--- a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c67be(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4c67be(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4ccf9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4ccf9a.wgsl.expected.ir.msl
index 88a1242..d02b0e0 100644
--- a/test/tint/builtins/gen/var/textureLoad/4ccf9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4ccf9a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_4ccf9a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4ccf9a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4ccf9a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4ccf9a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.ir.msl
index 72cbf21..0c2c593 100644
--- a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4cdca5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4cdca5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.msl
index 3f9485b..4337b50 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4db25c(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4db25c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4e2c5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4e2c5c.wgsl.expected.ir.msl
index 33f555f..aa969df 100644
--- a/test/tint/builtins/gen/var/textureLoad/4e2c5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4e2c5c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4e2c5c(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4e2c5c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4e2c5c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4e2c5c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4f5496.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4f5496.wgsl.expected.ir.msl
index a2bf3a4..6358e8d 100644
--- a/test/tint/builtins/gen/var/textureLoad/4f5496.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4f5496.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_4f5496(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f5496(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f5496(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4f5496(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4f90bb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4f90bb.wgsl.expected.ir.msl
index 6c42410..75db10d 100644
--- a/test/tint/builtins/gen/var/textureLoad/4f90bb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4f90bb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_4f90bb(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f90bb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4f90bb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_4f90bb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.ir.msl
index d4619be..3e4082d 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fa6ae(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fa6ae(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.ir.msl
index 71985bb..e36899c 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fd803(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_4fd803(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.ir.msl
index 5fa78e6..40c3bd5 100644
--- a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_505aa2(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_505aa2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.ir.msl
index 2b872e6..c6540d9 100644
--- a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_50915c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_50915c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5154e1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5154e1.wgsl.expected.ir.msl
index d0d1186..fb533e0 100644
--- a/test/tint/builtins/gen/var/textureLoad/5154e1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5154e1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_5154e1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5154e1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5154e1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5154e1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.ir.msl
index 7364236..00842ba 100644
--- a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_519ab5(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_519ab5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.ir.msl
index c50a2b1..6f2eb07 100644
--- a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53378a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53378a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/53941c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/53941c.wgsl.expected.ir.msl
index f5e9c3f..61946e0 100644
--- a/test/tint/builtins/gen/var/textureLoad/53941c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/53941c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_53941c(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53941c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53941c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_53941c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.ir.msl
index e1382f5..7d2d621 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53e142(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_53e142(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.ir.msl
index 8e9792e..686f28e 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54a59b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54a59b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.ir.msl
index ca95a12..a41d87a 100644
--- a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54e0ce(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54e0ce(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/54fb38.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/54fb38.wgsl.expected.ir.msl
index d05d687..13d360f 100644
--- a/test/tint/builtins/gen/var/textureLoad/54fb38.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/54fb38.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_54fb38(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54fb38(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_54fb38(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_54fb38(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.ir.msl
index 8e3c7ae..a061aa4 100644
--- a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_55e745(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_55e745(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.ir.msl
index fb30211..498b22c 100644
--- a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_560573(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_560573(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/56a000.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/56a000.wgsl.expected.ir.msl
index dbb78ec..c163988 100644
--- a/test/tint/builtins/gen/var/textureLoad/56a000.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/56a000.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_56a000(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_56a000(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_56a000(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_56a000(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.ir.msl
index 4b48c11..b04affa 100644
--- a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_582015(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_582015(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.ir.msl
index f230f44..7b014be 100644
--- a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_589eaa(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_589eaa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5a2f9d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5a2f9d.wgsl.expected.ir.msl
index d6a3b2f..c767cda 100644
--- a/test/tint/builtins/gen/var/textureLoad/5a2f9d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5a2f9d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5a2f9d(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5a2f9d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.ir.msl
index c6de1a8..cbf369b 100644
--- a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5abbf2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5abbf2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5b0f5b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5b0f5b.wgsl.expected.ir.msl
index 5cbf525..99451b1 100644
--- a/test/tint/builtins/gen/var/textureLoad/5b0f5b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5b0f5b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_5b0f5b(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b0f5b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b0f5b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5b0f5b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/5b4947.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5b4947.wgsl.expected.ir.msl
index e070e20..f9ee8de 100644
--- a/test/tint/builtins/gen/var/textureLoad/5b4947.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5b4947.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_5b4947(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b4947(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5b4947(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5b4947(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.ir.msl
index 5a0a7e5..f7f2505 100644
--- a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5bb7fb(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5bb7fb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5c69f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5c69f8.wgsl.expected.ir.msl
index 1bd6a39..771f50e 100644
--- a/test/tint/builtins/gen/var/textureLoad/5c69f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5c69f8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_5c69f8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5c69f8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5c69f8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5c69f8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/5cd3fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5cd3fc.wgsl.expected.ir.msl
index f30431c..7f23026c 100644
--- a/test/tint/builtins/gen/var/textureLoad/5cd3fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5cd3fc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_5cd3fc(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cd3fc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cd3fc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5cd3fc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.ir.msl
index 54eec97..6b31da5 100644
--- a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cee3b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5cee3b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.ir.msl
index 0a7b96b..b3014a5 100644
--- a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d0a2f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d0a2f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.ir.msl
index 07626ba..5d16e7c 100644
--- a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d4042(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5d4042(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5dd4c7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5dd4c7.wgsl.expected.ir.msl
index a4e1eff..31399c5 100644
--- a/test/tint/builtins/gen/var/textureLoad/5dd4c7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5dd4c7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5dd4c7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5dd4c7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5e17a7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5e17a7.wgsl.expected.ir.msl
index a03200a..e10f3a5 100644
--- a/test/tint/builtins/gen/var/textureLoad/5e17a7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5e17a7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_5e17a7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e17a7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e17a7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5e17a7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/5e1843.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5e1843.wgsl.expected.ir.msl
index 9773f4b..d202e91 100644
--- a/test/tint/builtins/gen/var/textureLoad/5e1843.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5e1843.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_5e1843(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e1843(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e1843(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_5e1843(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.ir.msl
index 7a82ddd..ff023f3 100644
--- a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e8d3f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5e8d3f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5ed6ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5ed6ad.wgsl.expected.ir.msl
index 2c78221..98cf479 100644
--- a/test/tint/builtins/gen/var/textureLoad/5ed6ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5ed6ad.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5ed6ad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5ed6ad(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.ir.msl
index c84012d..933c9a3 100644
--- a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5f4473(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5f4473(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.ir.msl
index 5bf4e89..530ca68 100644
--- a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5feb4d(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_5feb4d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.ir.msl
index 4047c11..3d8aa95 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6154d4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6154d4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/61e2e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/61e2e8.wgsl.expected.ir.msl
index bf77c69..b041a13 100644
--- a/test/tint/builtins/gen/var/textureLoad/61e2e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/61e2e8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_61e2e8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_61e2e8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_61e2e8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_61e2e8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.ir.msl
index 03d6d31..0a566ce 100644
--- a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_620caa(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_620caa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/622278.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/622278.wgsl.expected.ir.msl
index 9736846..ea527d4 100644
--- a/test/tint/builtins/gen/var/textureLoad/622278.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/622278.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_622278(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_622278(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_622278(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.msl
index 40a44e6..6158223 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6273b1(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6273b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.ir.msl
index 66bee3e..3b269a7 100644
--- a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d125(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d125(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/62d1de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/62d1de.wgsl.expected.ir.msl
index ef3e1a3..340a847 100644
--- a/test/tint/builtins/gen/var/textureLoad/62d1de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/62d1de.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d1de(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_62d1de(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.ir.msl
index 13665d5..90dc5ad 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_639962(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_639962(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.ir.msl
index 84269ac..9b5fc20 100644
--- a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_63be18(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_63be18(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/64c372.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/64c372.wgsl.expected.ir.msl
index 5c44c50..4a05d57 100644
--- a/test/tint/builtins/gen/var/textureLoad/64c372.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/64c372.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_64c372(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_64c372(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_64c372(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_64c372(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.ir.msl
index 6c3c413..f0d65a8 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_656d76(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_656d76(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.ir.msl
index a2473e3..4967a51 100644
--- a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_65a4d0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_65a4d0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/666010.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/666010.wgsl.expected.ir.msl
index 6d36149..890e898 100644
--- a/test/tint/builtins/gen/var/textureLoad/666010.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/666010.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_666010(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_666010(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_666010(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_666010(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.ir.msl
index dd94eee..0de56b2 100644
--- a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6678b6(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6678b6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.msl
index dc4c434..3c1e3bf 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_66be47(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_66be47(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/67d826.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/67d826.wgsl.expected.ir.msl
index dc018fb..1c722c3 100644
--- a/test/tint/builtins/gen/var/textureLoad/67d826.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/67d826.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_67d826(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67d826(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67d826(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_67d826(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.ir.msl
index a5ef8fc..29d61dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67edca(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_67edca(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/68d273.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/68d273.wgsl.expected.ir.msl
index 9fe5e27..63dfcf7 100644
--- a/test/tint/builtins/gen/var/textureLoad/68d273.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/68d273.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_68d273(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_68d273(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_68d273(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_68d273(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.msl
index 10044d2..c33c97c 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6925bc(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6925bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/69fee5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/69fee5.wgsl.expected.ir.msl
index b527e5e..51ad6bb 100644
--- a/test/tint/builtins/gen/var/textureLoad/69fee5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/69fee5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_69fee5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_69fee5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_69fee5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_69fee5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6a6871.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6a6871.wgsl.expected.ir.msl
index 17e22a0..570650c 100644
--- a/test/tint/builtins/gen/var/textureLoad/6a6871.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6a6871.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6a6871(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6a6871(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6a6871(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6a6871(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6b77d4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6b77d4.wgsl.expected.ir.msl
index 03706ca..c5fc11d 100644
--- a/test/tint/builtins/gen/var/textureLoad/6b77d4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6b77d4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b77d4(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b77d4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/6b8ba6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6b8ba6.wgsl.expected.ir.msl
index df81abd..ed56bbd 100644
--- a/test/tint/builtins/gen/var/textureLoad/6b8ba6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6b8ba6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6b8ba6(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b8ba6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6b8ba6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6b8ba6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6ba9ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6ba9ab.wgsl.expected.ir.msl
index 00234d9..002f85a 100644
--- a/test/tint/builtins/gen/var/textureLoad/6ba9ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6ba9ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6ba9ab(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6ba9ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6ba9ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6ba9ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf3e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6bf3e2.wgsl.expected.ir.msl
index 9756146..aba9bcd 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf3e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf3e2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6bf3e2(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf3e2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf3e2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6bf3e2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.ir.msl
index 3ec04f6..50bf049 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf4b7(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6bf4b7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/6d1fb4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6d1fb4.wgsl.expected.ir.msl
index baaf491..a67c82b 100644
--- a/test/tint/builtins/gen/var/textureLoad/6d1fb4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6d1fb4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_6d1fb4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d1fb4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d1fb4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6d1fb4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.ir.msl
index 2c9743a..13d0690 100644
--- a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d376a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d376a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/6d7bb5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6d7bb5.wgsl.expected.ir.msl
index ce5504a..61db903 100644
--- a/test/tint/builtins/gen/var/textureLoad/6d7bb5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6d7bb5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6d7bb5(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d7bb5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6d7bb5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6d7bb5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6e903f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6e903f.wgsl.expected.ir.msl
index 565dbce..6fff8c1 100644
--- a/test/tint/builtins/gen/var/textureLoad/6e903f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6e903f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_6e903f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6e903f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6e903f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6e903f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6f0370.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6f0370.wgsl.expected.ir.msl
index 18e1bba..9549068 100644
--- a/test/tint/builtins/gen/var/textureLoad/6f0370.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6f0370.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0370(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0370(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/6f0ea8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6f0ea8.wgsl.expected.ir.msl
index 87be09e..9412058 100644
--- a/test/tint/builtins/gen/var/textureLoad/6f0ea8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6f0ea8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6f0ea8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0ea8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f0ea8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6f0ea8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.ir.msl
index a8f2bba..1f9dced 100644
--- a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f1750(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f1750(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/6f8927.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/6f8927.wgsl.expected.ir.msl
index 80ea070..e4f57a4 100644
--- a/test/tint/builtins/gen/var/textureLoad/6f8927.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6f8927.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_6f8927(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f8927(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_6f8927(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_6f8927(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.ir.msl
index b944e7a..3ecb356 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_714471(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_714471(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.ir.msl
index f1c856f..b1f2244 100644
--- a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72bb3c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72bb3c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/72c9c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/72c9c3.wgsl.expected.ir.msl
index 9b47c5b..4caa4c2 100644
--- a/test/tint/builtins/gen/var/textureLoad/72c9c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/72c9c3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_72c9c3(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72c9c3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_72c9c3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_72c9c3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/742f1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/742f1b.wgsl.expected.ir.msl
index 715c66f..60743fc 100644
--- a/test/tint/builtins/gen/var/textureLoad/742f1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/742f1b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_742f1b(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_742f1b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_742f1b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_742f1b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.ir.msl
index 78349b0..362f65c 100644
--- a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_749704(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_749704(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/74a387.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/74a387.wgsl.expected.ir.msl
index f8bbbb9..8863c67 100644
--- a/test/tint/builtins/gen/var/textureLoad/74a387.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/74a387.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_74a387(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_74a387(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_74a387(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_74a387(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.ir.msl
index 2ffdedc..1fd048e 100644
--- a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_773c46(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_773c46(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.ir.msl
index fea6225..8243773 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_789045(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_789045(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.ir.msl
index 9220731..e706e98 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_79e697(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_79e697(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.ir.msl
index b1484c3..4349325 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7ab4df(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7ab4df(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.msl
index 18cd1f3..e273f5d 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7b63e0(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7b63e0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.ir.msl
index 67d29d1..7e22d3d 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7bee94(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7bee94(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.ir.msl
index c42b035..3e29430 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7c90e5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7c90e5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.ir.msl
index 500130d..672eb63 100644
--- a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dab57(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dab57(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/7dd3d5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7dd3d5.wgsl.expected.ir.msl
index a1cdc14..c1c9337 100644
--- a/test/tint/builtins/gen/var/textureLoad/7dd3d5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7dd3d5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_7dd3d5(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dd3d5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7dd3d5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_7dd3d5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/7e5cbc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7e5cbc.wgsl.expected.ir.msl
index 650d8a3..f0571b6 100644
--- a/test/tint/builtins/gen/var/textureLoad/7e5cbc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7e5cbc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_7e5cbc(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7e5cbc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7e5cbc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_7e5cbc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.msl
index 69a51a7..db48a25 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7fd822(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_7fd822(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/80dae1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/80dae1.wgsl.expected.ir.msl
index 79d3853..fc5d9af 100644
--- a/test/tint/builtins/gen/var/textureLoad/80dae1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/80dae1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_80dae1(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_80dae1(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_80dae1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_80dae1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/81c381.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/81c381.wgsl.expected.ir.msl
index bcefc08..1464b3a 100644
--- a/test/tint/builtins/gen/var/textureLoad/81c381.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/81c381.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_81c381(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_81c381(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.ir.msl
index 7a16cc4..9a5ff83 100644
--- a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83162f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83162f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.ir.msl
index 0cb79d6..8ccfcbb 100644
--- a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83cea4(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83cea4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/83d6e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/83d6e3.wgsl.expected.ir.msl
index 2be3fe2..76ee269 100644
--- a/test/tint/builtins/gen/var/textureLoad/83d6e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/83d6e3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_83d6e3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83d6e3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_83d6e3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_83d6e3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/848d85.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/848d85.wgsl.expected.ir.msl
index 35103f3..8948914 100644
--- a/test/tint/builtins/gen/var/textureLoad/848d85.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/848d85.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_848d85(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_848d85(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_848d85(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_848d85(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/84a438.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/84a438.wgsl.expected.ir.msl
index ce5326f..2a6688e 100644
--- a/test/tint/builtins/gen/var/textureLoad/84a438.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/84a438.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_84a438(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84a438(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84a438(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_84a438(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.ir.msl
index 4fb6c80..a064db2 100644
--- a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84c728(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84c728(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.ir.msl
index 8e77dbf..1fc8274 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84dee1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_84dee1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.ir.msl
index 2d1101d..b0107ff 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8527b1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8527b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.ir.msl
index 743df0c..a74d758 100644
--- a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_862833(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_862833(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/878e24.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/878e24.wgsl.expected.ir.msl
index 6d5ad9f..38ab18c 100644
--- a/test/tint/builtins/gen/var/textureLoad/878e24.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/878e24.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_878e24(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_878e24(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_878e24(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_878e24(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.ir.msl
index fd67f85..ab2596d 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87be85(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87be85(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/87f0a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/87f0a6.wgsl.expected.ir.msl
index da922d5..3313f8d 100644
--- a/test/tint/builtins/gen/var/textureLoad/87f0a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/87f0a6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_87f0a6(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87f0a6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_87f0a6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_87f0a6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/881349.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/881349.wgsl.expected.ir.msl
index fd21edb..ed37b50 100644
--- a/test/tint/builtins/gen/var/textureLoad/881349.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/881349.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_881349(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_881349(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_881349(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_881349(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.ir.msl
index 17d7c59..0a851ab 100644
--- a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_89620b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_89620b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.ir.msl
index 546c4b1..552638e 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_897cf3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_897cf3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.ir.msl
index 821d245..d833914 100644
--- a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a291b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a291b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.ir.msl
index 6e502a5..a78084e 100644
--- a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a9988(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8a9988(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
index 4b7a042..b99e178 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
@@ -30,10 +30,10 @@
 };
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -85,13 +85,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_8acf41(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
   (*tint_module_vars.prevent_dce) = textureLoad_8acf41(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8b62fb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8b62fb.wgsl.expected.ir.msl
index 6fc3a7b..bdefeeb 100644
--- a/test/tint/builtins/gen/var/textureLoad/8b62fb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8b62fb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_8b62fb(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8b62fb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8b62fb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8b62fb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/8bf8c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8bf8c2.wgsl.expected.ir.msl
index d37a5a0..41092b0 100644
--- a/test/tint/builtins/gen/var/textureLoad/8bf8c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8bf8c2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_8bf8c2(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8bf8c2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8bf8c2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8bf8c2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/8c6176.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8c6176.wgsl.expected.ir.msl
index e4eae0a..347cb54 100644
--- a/test/tint/builtins/gen/var/textureLoad/8c6176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8c6176.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_8c6176(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8c6176(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8c6176(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8c6176(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.msl
index 0814849..39b964b 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ccbe3(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ccbe3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8d64c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8d64c3.wgsl.expected.ir.msl
index 86904d1..d57d1b5 100644
--- a/test/tint/builtins/gen/var/textureLoad/8d64c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8d64c3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_8d64c3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8d64c3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8d64c3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8d64c3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.ir.msl
index bac387c..2f50719 100644
--- a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8db0ce(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8db0ce(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.ir.msl
index 1b068cd..68bf263 100644
--- a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e5032(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e5032(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/8e68c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8e68c9.wgsl.expected.ir.msl
index 0815ed9..428715b 100644
--- a/test/tint/builtins/gen/var/textureLoad/8e68c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8e68c9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_8e68c9(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e68c9(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8e68c9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8e68c9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/8fc29b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8fc29b.wgsl.expected.ir.msl
index c6ce25a..673ffd2 100644
--- a/test/tint/builtins/gen/var/textureLoad/8fc29b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8fc29b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_8fc29b(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8fc29b(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8fc29b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_8fc29b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.ir.msl
index 22d7715..2cd7ca7 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ff033(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_8ff033(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/91ede5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/91ede5.wgsl.expected.ir.msl
index a96cddd..9744d23 100644
--- a/test/tint/builtins/gen/var/textureLoad/91ede5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/91ede5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_91ede5(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_91ede5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_91ede5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_91ede5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/9242e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9242e7.wgsl.expected.ir.msl
index dc845d5..ad17728 100644
--- a/test/tint/builtins/gen/var/textureLoad/9242e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9242e7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_9242e7(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9242e7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9242e7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_9242e7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/92dd61.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/92dd61.wgsl.expected.ir.msl
index 61bb475b..41fdd4e 100644
--- a/test/tint/builtins/gen/var/textureLoad/92dd61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/92dd61.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_92dd61(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92dd61(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92dd61(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_92dd61(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.ir.msl
index ba5594c..b5b3898 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92eb1f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_92eb1f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.ir.msl
index ea29f07..0ab64b7 100644
--- a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_936952(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_936952(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/93f23e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/93f23e.wgsl.expected.ir.msl
index 4a0fb06..e0e83d3 100644
--- a/test/tint/builtins/gen/var/textureLoad/93f23e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/93f23e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_93f23e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_93f23e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_93f23e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_93f23e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/947107.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/947107.wgsl.expected.ir.msl
index 26862d8..a5e1062 100644
--- a/test/tint/builtins/gen/var/textureLoad/947107.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/947107.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_947107(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_947107(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.ir.msl
index 0065b6a0..548ba3a 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_96efd5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_96efd5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.ir.msl
index 9acd76e..60999ce 100644
--- a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_970308(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_970308(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.ir.msl
index 9951da2..a7d3558 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9885b0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9885b0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/99d8fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/99d8fa.wgsl.expected.ir.msl
index 1d78f80..6c13759 100644
--- a/test/tint/builtins/gen/var/textureLoad/99d8fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/99d8fa.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_99d8fa(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_99d8fa(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_99d8fa(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_99d8fa(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.ir.msl
index 4e1f46b..43b42fc 100644
--- a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a7c90(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a7c90(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.ir.msl
index 915f1b0..ca75e58 100644
--- a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a8c1e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9a8c1e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.ir.msl
index 38ab9d4..f1034d5 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9aa733(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9aa733(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.msl
index 5a59ae2..8ce6171 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b2667(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b2667(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.ir.msl
index 7fb3c9b..6644a17 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b5343(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9b5343(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.ir.msl
index d93012c..0fa3c65 100644
--- a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2376(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2376(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.ir.msl
index 5101667..a82dea5 100644
--- a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2a14(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9c2a14(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.ir.msl
index 16ce228..74166bf 100644
--- a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9cf7df(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9cf7df(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.ir.msl
index f55720b..399ad7e 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9d70e9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9d70e9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.ir.msl
index 27ac332..669f271 100644
--- a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9de6f5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9de6f5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.msl
index 4b094b3..34ee018 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9ed19e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9ed19e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9fa9fd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9fa9fd.wgsl.expected.ir.msl
index 458518e..bdcfd6d 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fa9fd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9fa9fd.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_9fa9fd(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fa9fd(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fa9fd(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_9fa9fd(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.ir.msl
index 7b61061..ad8b02c 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fbfd9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fbfd9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/9fd7be.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/9fd7be.wgsl.expected.ir.msl
index b6694cc..1a62467 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fd7be.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9fd7be.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_9fd7be(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fd7be(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_9fd7be(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_9fd7be(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.ir.msl
index 9282a46..2c76720 100644
--- a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a03af1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a03af1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.ir.msl
index f337604..a354a10 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a24be1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a24be1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a2b3f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a2b3f4.wgsl.expected.ir.msl
index 29c7e3c..f3b550c 100644
--- a/test/tint/builtins/gen/var/textureLoad/a2b3f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a2b3f4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a2b3f4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a2b3f4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a2b3f4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a2b3f4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a3733f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a3733f.wgsl.expected.ir.msl
index 194cd09..a05eda5 100644
--- a/test/tint/builtins/gen/var/textureLoad/a3733f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a3733f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a3733f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3733f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3733f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a3733f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a3f122.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a3f122.wgsl.expected.ir.msl
index fce1d59..e97dd0a 100644
--- a/test/tint/builtins/gen/var/textureLoad/a3f122.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a3f122.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a3f122(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3f122(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a3f122(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a3f122(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a548a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a548a8.wgsl.expected.ir.msl
index 57ce52d..c8a9393 100644
--- a/test/tint/builtins/gen/var/textureLoad/a548a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a548a8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a548a8(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a548a8(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a548a8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a548a8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a54e11.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a54e11.wgsl.expected.ir.msl
index 294fc9f..5ece5de 100644
--- a/test/tint/builtins/gen/var/textureLoad/a54e11.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a54e11.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_a54e11(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a54e11(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a54e11(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a54e11(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.ir.msl
index e427936..bb17f84 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a583c9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a583c9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a5c4e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a5c4e2.wgsl.expected.ir.msl
index 0f594bf..7dbb7ed 100644
--- a/test/tint/builtins/gen/var/textureLoad/a5c4e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a5c4e2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_a5c4e2(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5c4e2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5c4e2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a5c4e2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a5e0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a5e0a5.wgsl.expected.ir.msl
index 6b69b59..f3e88d4 100644
--- a/test/tint/builtins/gen/var/textureLoad/a5e0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a5e0a5.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a5e0a5(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5e0a5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a5e0a5(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a5e0a5(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a64b1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a64b1d.wgsl.expected.ir.msl
index 1bebc2c..a714d4d 100644
--- a/test/tint/builtins/gen/var/textureLoad/a64b1d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a64b1d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a64b1d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a64b1d(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a64b1d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a64b1d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.ir.msl
index d410acd..528b8a6 100644
--- a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6a85a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6a85a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.ir.msl
index 71fa994..f7677f5 100644
--- a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6b61d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a6b61d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.ir.msl
index b4c2980..0a4d145 100644
--- a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7444c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7444c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.ir.msl
index 0ba6d13..2d2da77 100644
--- a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7a3c3(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7a3c3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a7bcb4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a7bcb4.wgsl.expected.ir.msl
index 022b75b..b1ac145 100644
--- a/test/tint/builtins/gen/var/textureLoad/a7bcb4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a7bcb4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a7bcb4(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7bcb4(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7bcb4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a7bcb4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7c171.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a7c171.wgsl.expected.ir.msl
index 50767a7..b575dd7 100644
--- a/test/tint/builtins/gen/var/textureLoad/a7c171.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a7c171.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_a7c171(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7c171(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a7c171(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a7c171(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.ir.msl
index cddfe5e4..f80ac6f 100644
--- a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a8549b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a8549b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/a92b18.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a92b18.wgsl.expected.ir.msl
index c056c02..3820acc 100644
--- a/test/tint/builtins/gen/var/textureLoad/a92b18.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a92b18.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_a92b18(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a92b18(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a92b18(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_a92b18(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.ir.msl
index 8970c5a..3587fac 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a9a9f5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_a9a9f5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/aa2579.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aa2579.wgsl.expected.ir.msl
index ff03b9c..6b8b0eb 100644
--- a/test/tint/builtins/gen/var/textureLoad/aa2579.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aa2579.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_aa2579(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa2579(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa2579(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_aa2579(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/aa6130.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aa6130.wgsl.expected.ir.msl
index 853a0e7..48c8c4d 100644
--- a/test/tint/builtins/gen/var/textureLoad/aa6130.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aa6130.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_aa6130(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa6130(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa6130(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_aa6130(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.ir.msl
index 203768f..9175801 100644
--- a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa8a0d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aa8a0d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.ir.msl
index 3610e75..41e9494 100644
--- a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae7f6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae7f6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/aae9c3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aae9c3.wgsl.expected.ir.msl
index 461b843..a5eefb2 100644
--- a/test/tint/builtins/gen/var/textureLoad/aae9c3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aae9c3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_aae9c3(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae9c3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aae9c3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_aae9c3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.ir.msl
index b99ce09..418010a 100644
--- a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ac64f7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ac64f7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/acf22f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/acf22f.wgsl.expected.ir.msl
index d51cd7f..8142039 100644
--- a/test/tint/builtins/gen/var/textureLoad/acf22f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/acf22f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_acf22f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_acf22f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_acf22f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_acf22f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/ad551e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ad551e.wgsl.expected.ir.msl
index 4e3c995..7b0cffe 100644
--- a/test/tint/builtins/gen/var/textureLoad/ad551e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ad551e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_ad551e(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ad551e(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ad551e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ad551e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.ir.msl
index 1c9e507..0d37296 100644
--- a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aeae73(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aeae73(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.ir.msl
index 64a07c5..2699742 100644
--- a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aebc09(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_aebc09(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/af0507.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/af0507.wgsl.expected.ir.msl
index 65c5650..f048b67 100644
--- a/test/tint/builtins/gen/var/textureLoad/af0507.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/af0507.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_af0507(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_af0507(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_af0507(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_af0507(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.ir.msl
index 9458ad0..02ee0ba 100644
--- a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1bf79(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1bf79(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b1ca35.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b1ca35.wgsl.expected.ir.msl
index 328a1f3..3af29b1 100644
--- a/test/tint/builtins/gen/var/textureLoad/b1ca35.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b1ca35.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_b1ca35(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1ca35(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b1ca35(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b1ca35(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.ir.msl
index f4e22c8..6375056 100644
--- a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b24d27(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b24d27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b25644.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b25644.wgsl.expected.ir.msl
index b478f2e..e20d14e 100644
--- a/test/tint/builtins/gen/var/textureLoad/b25644.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b25644.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_b25644(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b25644(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b25644(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b25644(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b27c33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b27c33.wgsl.expected.ir.msl
index badecdb..88791b7 100644
--- a/test/tint/builtins/gen/var/textureLoad/b27c33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b27c33.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_b27c33(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b27c33(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b27c33(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b27c33(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.ir.msl
index 0439c0d..2708d40 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b29f71(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b29f71(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b4d6c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b4d6c4.wgsl.expected.ir.msl
index e8c8886..7a47868 100644
--- a/test/tint/builtins/gen/var/textureLoad/b4d6c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b4d6c4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_b4d6c4(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b4d6c4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b4d6c4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b4d6c4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.ir.msl
index f00c4a7..62412c0 100644
--- a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b58c6d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b58c6d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b60a86.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b60a86.wgsl.expected.ir.msl
index a070396..020fc8e 100644
--- a/test/tint/builtins/gen/var/textureLoad/b60a86.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b60a86.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_b60a86(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60a86(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60a86(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b60a86(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b60db7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b60db7.wgsl.expected.ir.msl
index a678d04..af89607 100644
--- a/test/tint/builtins/gen/var/textureLoad/b60db7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b60db7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_b60db7(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60db7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b60db7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b60db7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.msl
index f4aa3ec..d924cb8 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6ba5d(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6ba5d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.ir.msl
index 1209645..40fc2c1 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6c458(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b6c458(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.ir.msl
index 87ee45b..f1fe7c2 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b73f6b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b73f6b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b75c8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b75c8f.wgsl.expected.ir.msl
index b09413b..1389fa0 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75c8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b75c8f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_b75c8f(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75c8f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75c8f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_b75c8f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.ir.msl
index 52e66c4..e451ac1 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75d4a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b75d4a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.ir.msl
index bd99e3b..a4cc9dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b7f74f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b7f74f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.ir.msl
index 65ba596..3b35f7a 100644
--- a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b80e7e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b80e7e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.ir.msl
index ac3990a..9430fee 100644
--- a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b94d15(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_b94d15(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ba023a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ba023a.wgsl.expected.ir.msl
index dd3c1f9..acb1fee 100644
--- a/test/tint/builtins/gen/var/textureLoad/ba023a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ba023a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ba023a(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba023a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba023a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ba023a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/ba74b2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ba74b2.wgsl.expected.ir.msl
index f362e98..db6a87e 100644
--- a/test/tint/builtins/gen/var/textureLoad/ba74b2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ba74b2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ba74b2(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba74b2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ba74b2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ba74b2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/babdf3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/babdf3.wgsl.expected.ir.msl
index 9ed170d..1fa62d0 100644
--- a/test/tint/builtins/gen/var/textureLoad/babdf3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/babdf3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_babdf3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_babdf3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_babdf3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_babdf3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/bba04a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bba04a.wgsl.expected.ir.msl
index 981b22e..bb2e554 100644
--- a/test/tint/builtins/gen/var/textureLoad/bba04a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bba04a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_bba04a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bba04a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bba04a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bba04a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/bbb762.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bbb762.wgsl.expected.ir.msl
index 60d88b9..ef2c492 100644
--- a/test/tint/builtins/gen/var/textureLoad/bbb762.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bbb762.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_bbb762(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bbb762(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bbb762(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bbb762(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.ir.msl
index 798467b..e37cb7f 100644
--- a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc3201(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc3201(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/bc882d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bc882d.wgsl.expected.ir.msl
index c1fb926..e9724b1 100644
--- a/test/tint/builtins/gen/var/textureLoad/bc882d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bc882d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_bc882d(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc882d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bc882d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bc882d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.ir.msl
index 9b48312..8b8fbac 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bcbb3c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bcbb3c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/bd990a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bd990a.wgsl.expected.ir.msl
index b4e9f27..4a387e1 100644
--- a/test/tint/builtins/gen/var/textureLoad/bd990a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bd990a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_bd990a(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bd990a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bd990a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bd990a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/bdc67a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bdc67a.wgsl.expected.ir.msl
index 3b7e2dc..6eed91c 100644
--- a/test/tint/builtins/gen/var/textureLoad/bdc67a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bdc67a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_bdc67a(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bdc67a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bdc67a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_bdc67a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.ir.msl
index 6bda236..4a6e837 100644
--- a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bfd154(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_bfd154(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.ir.msl
index 6e3b356..2a79ac9 100644
--- a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c02b74(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c02b74(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.ir.msl
index d4d9ede..eed7eb0 100644
--- a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c07013(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c07013(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.msl
index f7a4147..3904772 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c16e00(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c16e00(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.ir.msl
index 023ee96..8af7c08 100644
--- a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c21b33(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c21b33(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.ir.msl
index deafbec..0772c67 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2a480(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2a480(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c2d09a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c2d09a.wgsl.expected.ir.msl
index 7636006..0204d30 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2d09a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c2d09a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_c2d09a(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2d09a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c2d09a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c2d09a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.ir.msl
index 14f30b3..e346263 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c378ee(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c378ee(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.ir.msl
index 0d75802..d41c209 100644
--- a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c40dcb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c40dcb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.ir.msl
index 6813c51..e3ef108 100644
--- a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c456bc(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c456bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.ir.msl
index ad3ce1f..aa30952 100644
--- a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5791b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5791b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c5c86d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c5c86d.wgsl.expected.ir.msl
index 3eac315..6d74016 100644
--- a/test/tint/builtins/gen/var/textureLoad/c5c86d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c5c86d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c5c86d(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5c86d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c5c86d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c5c86d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.ir.msl
index 54c77b3..96c7d4b 100644
--- a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c66b20(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c66b20(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.ir.msl
index 4700cfa..8d8257d 100644
--- a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7cbed(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7cbed(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c7e313.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c7e313.wgsl.expected.ir.msl
index b19f244..b214067 100644
--- a/test/tint/builtins/gen/var/textureLoad/c7e313.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c7e313.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_c7e313(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7e313(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c7e313(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c7e313(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/c80691.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c80691.wgsl.expected.ir.msl
index f19ed0a..e13c6fd 100644
--- a/test/tint/builtins/gen/var/textureLoad/c80691.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c80691.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c80691(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c80691(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c80691(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c80691(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.ir.msl
index 0074e84..489e45f 100644
--- a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c8ed19(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c8ed19(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c98bf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c98bf4.wgsl.expected.ir.msl
index 3b98bba..299542f 100644
--- a/test/tint/builtins/gen/var/textureLoad/c98bf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c98bf4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_c98bf4(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c98bf4(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c98bf4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c98bf4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/c9b083.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c9b083.wgsl.expected.ir.msl
index 4f797d4..7c45955 100644
--- a/test/tint/builtins/gen/var/textureLoad/c9b083.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c9b083.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c9b083(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9b083(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9b083(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c9b083(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.ir.msl
index 2b63d81..c34c2e5 100644
--- a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9cc40(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9cc40(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/c9f310.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/c9f310.wgsl.expected.ir.msl
index 0dfa556..ca43d16 100644
--- a/test/tint/builtins/gen/var/textureLoad/c9f310.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c9f310.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_c9f310(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9f310(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_c9f310(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_c9f310(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/cac876.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cac876.wgsl.expected.ir.msl
index 222c0bb..fe1c6fc 100644
--- a/test/tint/builtins/gen/var/textureLoad/cac876.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cac876.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_cac876(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cac876(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cac876(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cac876(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.ir.msl
index cc84f2f..6ed5278 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cad5f2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cad5f2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.msl
index d8de7c5..e1374e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cb57c2(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cb57c2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/cdbcf6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cdbcf6.wgsl.expected.ir.msl
index 0cc8301..1814b5f 100644
--- a/test/tint/builtins/gen/var/textureLoad/cdbcf6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cdbcf6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_cdbcf6(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdbcf6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdbcf6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cdbcf6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/cdccd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cdccd2.wgsl.expected.ir.msl
index 3ba14c5..b7bf995 100644
--- a/test/tint/builtins/gen/var/textureLoad/cdccd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cdccd2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_cdccd2(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdccd2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdccd2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cdccd2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.ir.msl
index c3cf480..72c7c70 100644
--- a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdd343(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cdd343(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/cddf6b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cddf6b.wgsl.expected.ir.msl
index 411b1d8..6b55db1 100644
--- a/test/tint/builtins/gen/var/textureLoad/cddf6b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cddf6b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_cddf6b(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cddf6b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cddf6b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cddf6b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/cec477.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cec477.wgsl.expected.ir.msl
index 11d8d39..296c0d9 100644
--- a/test/tint/builtins/gen/var/textureLoad/cec477.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cec477.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_cec477(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cec477(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cec477(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_cec477(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/cece6c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/cece6c.wgsl.expected.ir.msl
index ec4d654..9b81d16 100644
--- a/test/tint/builtins/gen/var/textureLoad/cece6c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cece6c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cece6c(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_cece6c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.ir.msl
index 543f8d1..2ba52ad 100644
--- a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d02afc(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d02afc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d0e351.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d0e351.wgsl.expected.ir.msl
index 0d6c7a5..3dc1e81 100644
--- a/test/tint/builtins/gen/var/textureLoad/d0e351.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d0e351.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_d0e351(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d0e351(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d0e351(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d0e351(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.ir.msl
index fd9c109..a50af73 100644
--- a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d357bb(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d357bb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d37a08.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d37a08.wgsl.expected.ir.msl
index 5baab88..0e5ac39 100644
--- a/test/tint/builtins/gen/var/textureLoad/d37a08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d37a08.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_d37a08(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d37a08(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d37a08(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d37a08(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d3d8fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d3d8fc.wgsl.expected.ir.msl
index 839d87f..e04f173 100644
--- a/test/tint/builtins/gen/var/textureLoad/d3d8fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d3d8fc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d3d8fc(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d3d8fc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d3d8fc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d3d8fc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d41c72.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d41c72.wgsl.expected.ir.msl
index 2805e78..27e9968 100644
--- a/test/tint/builtins/gen/var/textureLoad/d41c72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d41c72.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d41c72(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d41c72(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d41c72(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d41c72(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.ir.msl
index 7463eda..a8a235f 100644
--- a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d4df19(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d4df19(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.ir.msl
index 4bc4646..01c8bca 100644
--- a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d5c48d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d5c48d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d72de9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d72de9.wgsl.expected.ir.msl
index 6c6be53..a184ae7 100644
--- a/test/tint/builtins/gen/var/textureLoad/d72de9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d72de9.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d72de9(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d72de9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d72de9(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d72de9(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d7996a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d7996a.wgsl.expected.ir.msl
index a6fba39..24b13a4 100644
--- a/test/tint/builtins/gen/var/textureLoad/d7996a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d7996a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d7996a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d7996a(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d7996a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d7996a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d79c5c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d79c5c.wgsl.expected.ir.msl
index 0181864..4841a19 100644
--- a/test/tint/builtins/gen/var/textureLoad/d79c5c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d79c5c.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_d79c5c(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d79c5c(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d79c5c(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d79c5c(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d80ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d80ff3.wgsl.expected.ir.msl
index 7c0253c..65ee524 100644
--- a/test/tint/builtins/gen/var/textureLoad/d80ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d80ff3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_d80ff3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d80ff3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d80ff3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d80ff3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.ir.msl
index 5d79d9c..cde272f 100644
--- a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d81c57(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d81c57(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.ir.msl
index 19fcebf..29cc73a 100644
--- a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d85d61(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d85d61(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.ir.msl
index 41cad17..ed5896d 100644
--- a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8617f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8617f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/d8be5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d8be5a.wgsl.expected.ir.msl
index 87bcb1e..d46e1cc 100644
--- a/test/tint/builtins/gen/var/textureLoad/d8be5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d8be5a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_d8be5a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8be5a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d8be5a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d8be5a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/d91f37.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/d91f37.wgsl.expected.ir.msl
index 9a3ceab..d2db707 100644
--- a/test/tint/builtins/gen/var/textureLoad/d91f37.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/d91f37.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_d91f37(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d91f37(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_d91f37(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_d91f37(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/dab04f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/dab04f.wgsl.expected.ir.msl
index 8382bd8..e8afeae 100644
--- a/test/tint/builtins/gen/var/textureLoad/dab04f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/dab04f.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_dab04f(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dab04f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dab04f(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_dab04f(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.ir.msl
index 1b37add..a749faa 100644
--- a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dbd554(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dbd554(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/dd5859.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/dd5859.wgsl.expected.ir.msl
index 7af2ed0..86101f0 100644
--- a/test/tint/builtins/gen/var/textureLoad/dd5859.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/dd5859.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_dd5859(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd5859(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd5859(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_dd5859(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.ir.msl
index 761df9b..6c2392f 100644
--- a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd8776(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dd8776(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.ir.msl
index 0769929..a5b933b 100644
--- a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ddeed3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ddeed3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/de5a0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/de5a0e.wgsl.expected.ir.msl
index e816246..9811039 100644
--- a/test/tint/builtins/gen/var/textureLoad/de5a0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/de5a0e.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_de5a0e(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_de5a0e(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_de5a0e(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_de5a0e(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.ir.msl
index fd817ed..642b597 100644
--- a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dee8e7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dee8e7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/defd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/defd9a.wgsl.expected.ir.msl
index f59b88b..151d995 100644
--- a/test/tint/builtins/gen/var/textureLoad/defd9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/defd9a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_defd9a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_defd9a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_defd9a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_defd9a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.ir.msl
index 3cf3ebc..50024d1 100644
--- a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dfdf3b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_dfdf3b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e1c3cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e1c3cf.wgsl.expected.ir.msl
index 1f7cff4..b5acd67 100644
--- a/test/tint/builtins/gen/var/textureLoad/e1c3cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e1c3cf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_e1c3cf(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e1c3cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e1c3cf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e1c3cf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.ir.msl
index ebf4770..d13c3a4 100644
--- a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2292f(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2292f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e2b3a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e2b3a1.wgsl.expected.ir.msl
index f23a606..ea1e823 100644
--- a/test/tint/builtins/gen/var/textureLoad/e2b3a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e2b3a1.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_e2b3a1(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2b3a1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2b3a1(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e2b3a1(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/e2d7da.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e2d7da.wgsl.expected.ir.msl
index f294bdf..5779c20 100644
--- a/test/tint/builtins/gen/var/textureLoad/e2d7da.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e2d7da.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_e2d7da(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2d7da(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e2d7da(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e2d7da(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/e33285.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e33285.wgsl.expected.ir.msl
index 18a10c6..d6c07bd 100644
--- a/test/tint/builtins/gen/var/textureLoad/e33285.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e33285.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_e33285(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e33285(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e33285(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e33285(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.ir.msl
index a700cb8..2fa0f63 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e35f72(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e35f72(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.ir.msl
index d607fbc..1f5756c 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3b08b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3b08b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.ir.msl
index aaaf0b4..ffe19b0 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3d2cc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e3d2cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e4051a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e4051a.wgsl.expected.ir.msl
index bba2905..a79adde 100644
--- a/test/tint/builtins/gen/var/textureLoad/e4051a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e4051a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_e4051a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e4051a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e4051a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e4051a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.ir.msl
index 88b22ee..72e863d 100644
--- a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e57e92(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e57e92(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.ir.msl
index 2e75724..cf2f974 100644
--- a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e59fdf(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e59fdf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.ir.msl
index def92d7..c56910f 100644
--- a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e65916(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e65916(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.ir.msl
index 358a2be..3a5ae80 100644
--- a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e893d7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e893d7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.ir.msl
index 20342b7..5c63c6c 100644
--- a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e92dd0(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e92dd0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/e9eb65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/e9eb65.wgsl.expected.ir.msl
index 8afb2df..1f2ee4f 100644
--- a/test/tint/builtins/gen/var/textureLoad/e9eb65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e9eb65.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_e9eb65(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e9eb65(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_e9eb65(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_e9eb65(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.ir.msl
index 11f874f..14c7aa7 100644
--- a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ea2abd(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ea2abd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.ir.msl
index 343f872..77a916b 100644
--- a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eb573b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eb573b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.ir.msl
index 63a41e9..7189a19 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ebfb92(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ebfb92(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.ir.msl
index 89e79bb..bedccdf 100644
--- a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ecc823(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ecc823(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ed55a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ed55a8.wgsl.expected.ir.msl
index 9c0a428..2066556 100644
--- a/test/tint/builtins/gen/var/textureLoad/ed55a8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ed55a8.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ed55a8(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ed55a8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ed55a8(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ed55a8(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.ir.msl
index 3a3528f..9083e84 100644
--- a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture3d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ee33c5(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture3d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ee33c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.ir.msl
index 57fac88..6faa6a9 100644
--- a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eecf7d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_eecf7d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ef2ec3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ef2ec3.wgsl.expected.ir.msl
index 52961b5..f0c7ffc 100644
--- a/test/tint/builtins/gen/var/textureLoad/ef2ec3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ef2ec3.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_ef2ec3(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef2ec3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef2ec3(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_ef2ec3(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.ir.msl
index b1e06c3..debceeb 100644
--- a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef5405(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ef5405(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.ir.msl
index e620aed..c552b2b 100644
--- a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_efa787(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_efa787(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f0514a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f0514a.wgsl.expected.ir.msl
index be57c34..62aba7b 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0514a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f0514a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f0514a(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0514a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0514a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f0514a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.ir.msl
index afc9ddb..00b512c 100644
--- a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f06b69(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f06b69(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.ir.msl
index eb57cf2..7eca43e 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0abad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f0abad(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f1c549.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f1c549.wgsl.expected.ir.msl
index 87ddc0a..c09124d 100644
--- a/test/tint/builtins/gen/var/textureLoad/f1c549.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f1c549.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture3d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f1c549(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f1c549(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f1c549(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f1c549(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture3d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.ir.msl
index 8184546..cc1ef66 100644
--- a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2a7ff(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2a7ff(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f2bdd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f2bdd4.wgsl.expected.ir.msl
index cc7b903..c3f359d 100644
--- a/test/tint/builtins/gen/var/textureLoad/f2bdd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f2bdd4.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f2bdd4(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2bdd4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2bdd4(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f2bdd4(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f2c311.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f2c311.wgsl.expected.ir.msl
index be711cf..6c13904 100644
--- a/test/tint/builtins/gen/var/textureLoad/f2c311.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f2c311.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_f2c311(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2c311(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f2c311(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f2c311(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.ir.msl
index c897d37..7ef46b5 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f348d9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f348d9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.ir.msl
index f81c70a..2c9a06b 100644
--- a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f35ac7(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f35ac7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.ir.msl
index 8019979..123eaa1 100644
--- a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f379e2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f379e2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.ir.msl
index ad4dff9..22947e1 100644
--- a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture3d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f56e6f(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture3d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f56e6f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f5aee2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f5aee2.wgsl.expected.ir.msl
index 8897554..21803e9 100644
--- a/test/tint/builtins/gen/var/textureLoad/f5aee2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f5aee2.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5aee2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5aee2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f5fbc6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f5fbc6.wgsl.expected.ir.msl
index 5833f24..56cdc6e 100644
--- a/test/tint/builtins/gen/var/textureLoad/f5fbc6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f5fbc6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f5fbc6(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5fbc6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f5fbc6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f5fbc6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.ir.msl
index 1a796f5..424769d 100644
--- a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f74bd8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f74bd8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f3bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f7f3bc.wgsl.expected.ir.msl
index f7775ec..76c6a2f 100644
--- a/test/tint/builtins/gen/var/textureLoad/f7f3bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f7f3bc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f7f3bc(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f3bc(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f3bc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f7f3bc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.ir.msl
index 0881977..b85ceb0 100644
--- a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f936(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f7f936(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f81792.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f81792.wgsl.expected.ir.msl
index ee6fe92..e47c752 100644
--- a/test/tint/builtins/gen/var/textureLoad/f81792.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f81792.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f81792(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f81792(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f81792(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f81792(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f82eb2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f82eb2.wgsl.expected.ir.msl
index 80e580a..b41a423 100644
--- a/test/tint/builtins/gen/var/textureLoad/f82eb2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f82eb2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture1d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f82eb2(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f82eb2(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f82eb2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f82eb2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture1d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.ir.msl
index 9607600..248c578 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device int4* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f85291(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f85291(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.ir.msl
index 41c5266..65d12bb 100644
--- a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f8a2e8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f8a2e8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/f92c2d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f92c2d.wgsl.expected.ir.msl
index 0d95c2f..26eb466 100644
--- a/test/tint/builtins/gen/var/textureLoad/f92c2d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f92c2d.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_f92c2d(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f92c2d(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f92c2d(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_f92c2d(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.ir.msl
index cf7a93e..47a103f 100644
--- a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture1d<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f9eaaf(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture1d<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_f9eaaf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fc47ff.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fc47ff.wgsl.expected.ir.msl
index 7455865..fecf92f 100644
--- a/test/tint/builtins/gen/var/textureLoad/fc47ff.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fc47ff.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::read_write> arg_0;
   device int4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  int4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  int4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d<int, access::read_write> arg_0;
 };
 
 int4 textureLoad_fc47ff(tint_module_vars_struct tint_module_vars) {
@@ -22,25 +12,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc47ff(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::read_write> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc47ff(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_fc47ff(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.ir.msl
index 602755e..9aa6b661 100644
--- a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device int4* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc6d36(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device int4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fc6d36(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.msl
index 336917e..a0a79d6 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device float* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fcd23d(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fcd23d(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.ir.msl
index c9165d6..f342ba6 100644
--- a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd6442(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd6442(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fd9606.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fd9606.wgsl.expected.ir.msl
index a7d6b16..51e8cdb 100644
--- a/test/tint/builtins/gen/var/textureLoad/fd9606.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fd9606.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device float4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  float4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  float4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 float4 textureLoad_fd9606(tint_module_vars_struct tint_module_vars) {
@@ -23,25 +13,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd9606(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fd9606(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_fd9606(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.ir.msl
index 122ade0..3968c16 100644
--- a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -24,13 +24,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fdebd0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fdebd0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.ir.msl
index 532f576..571982e 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint4* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -23,13 +23,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe0565(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe0565(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.ir.msl
index d805823..66b20b5 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture1d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe222a(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe222a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/fe2c1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/fe2c1b.wgsl.expected.ir.msl
index dfb4e52..1a3f65e 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe2c1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fe2c1b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint4* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint4 prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint4 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint4 textureLoad_fe2c1b(tint_module_vars_struct tint_module_vars) {
@@ -24,25 +14,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe2c1b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_fe2c1b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureLoad_fe2c1b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v_1.pos, .VertexOutput_prevent_dce=v_1.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.ir.msl
index 50a8cfa..37bec21 100644
--- a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::read> arg_0;
   device float4* prevent_dce;
+  texture3d<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -22,13 +22,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_feab99(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_feab99(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.msl
index 612de7c..65d34dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device float* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ff1119(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureLoad_ff1119(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/014a3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/014a3b.wgsl.expected.ir.msl
index cf63f98..9c802d7 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/014a3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/014a3b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_014a3b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_014a3b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_014a3b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_014a3b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/071ebc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/071ebc.wgsl.expected.ir.msl
index 977de56..ce54265 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/071ebc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/071ebc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_071ebc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_071ebc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_071ebc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_071ebc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/0856ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/0856ae.wgsl.expected.ir.msl
index e87d2a2..24b055d 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/0856ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/0856ae.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_0856ae(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0856ae(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0856ae(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_0856ae(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/0ec222.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/0ec222.wgsl.expected.ir.msl
index 3d87d8e..449a841 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/0ec222.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/0ec222.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0ec222(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0ec222(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/0fe8dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/0fe8dc.wgsl.expected.ir.msl
index 7d4ada3..df7048e 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/0fe8dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/0fe8dc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0fe8dc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_0fe8dc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/17ccad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/17ccad.wgsl.expected.ir.msl
index 09d0bcd..2089aba 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/17ccad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/17ccad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_17ccad(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_17ccad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_17ccad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_17ccad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/1f858a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/1f858a.wgsl.expected.ir.msl
index 0a41f36..123cbf6 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/1f858a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/1f858a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_1f858a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_1f858a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_1f858a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_1f858a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/24d572.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/24d572.wgsl.expected.ir.msl
index fdf584d..ac8a24d 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/24d572.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/24d572.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_24d572(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_24d572(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_24d572(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_24d572(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/26c9f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/26c9f9.wgsl.expected.ir.msl
index d554d7f..8d950ff 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/26c9f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/26c9f9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_26c9f9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_26c9f9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/2a48dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/2a48dc.wgsl.expected.ir.msl
index 3df13c5..291ef8b 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/2a48dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/2a48dc.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_2a48dc(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2a48dc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2a48dc(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_2a48dc(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/2d95ea.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/2d95ea.wgsl.expected.ir.msl
index 59794cc..925a6a7 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/2d95ea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/2d95ea.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2d95ea(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_2d95ea(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/327d70.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/327d70.wgsl.expected.ir.msl
index 72b701a..97b0066 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/327d70.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/327d70.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_327d70(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_327d70(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_327d70(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_327d70(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/32ca10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/32ca10.wgsl.expected.ir.msl
index bd7c73d..9d9d39e 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/32ca10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/32ca10.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_32ca10(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_32ca10(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_32ca10(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_32ca10(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/3465ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/3465ec.wgsl.expected.ir.msl
index d8fb45e..0479076 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/3465ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/3465ec.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_3465ec(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3465ec(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3465ec(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_3465ec(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/34cefa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/34cefa.wgsl.expected.ir.msl
index 1853b9e..aa39066 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/34cefa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/34cefa.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_34cefa(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_34cefa(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/3580ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/3580ab.wgsl.expected.ir.msl
index 9a25bc1..bbdd5ca 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/3580ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/3580ab.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_3580ab(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3580ab(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3580ab(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_3580ab(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/379cc5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/379cc5.wgsl.expected.ir.msl
index 7689e7e..e4525a9 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/379cc5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/379cc5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_379cc5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_379cc5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/37bc8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/37bc8a.wgsl.expected.ir.msl
index 0228025..cf8b553 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/37bc8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/37bc8a.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_37bc8a(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_37bc8a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_37bc8a(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_37bc8a(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/380a60.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/380a60.wgsl.expected.ir.msl
index c8243d0..f3a7c66 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/380a60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/380a60.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_380a60(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_380a60(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_380a60(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_380a60(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/3ad143.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/3ad143.wgsl.expected.ir.msl
index 169a2cc..dedb6497 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/3ad143.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/3ad143.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3ad143(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3ad143(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/3eff89.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/3eff89.wgsl.expected.ir.msl
index 499861e..8e420ba 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/3eff89.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/3eff89.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3eff89(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_3eff89(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/485774.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/485774.wgsl.expected.ir.msl
index 81c70d4..9aa91cb 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/485774.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/485774.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_485774(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_485774(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.msl
index 1dd6576..8fa9d3c 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_48ef47(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_48ef47(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/4adaad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/4adaad.wgsl.expected.ir.msl
index a4e7c11..ac5977d 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/4adaad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/4adaad.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4adaad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4adaad(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/4c4333.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/4c4333.wgsl.expected.ir.msl
index 937d780..b55b33c 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/4c4333.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/4c4333.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_4c4333(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4c4333(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_4c4333(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_4c4333(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/520086.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/520086.wgsl.expected.ir.msl
index 69f98ff..0feff8d 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/520086.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/520086.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::read_write> arg_0;
 };
 
 uint textureNumLayers_520086(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_520086(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_520086(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_520086(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/52dfc5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/52dfc5.wgsl.expected.ir.msl
index ed88b05..ae8a1b6 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/52dfc5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/52dfc5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_52dfc5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_52dfc5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/54a654.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/54a654.wgsl.expected.ir.msl
index 3a4596b..14f0c42 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/54a654.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/54a654.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_54a654(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_54a654(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_54a654(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_54a654(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/555f67.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/555f67.wgsl.expected.ir.msl
index 802ba9f..487fb87 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/555f67.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/555f67.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_555f67(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_555f67(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/59cc27.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/59cc27.wgsl.expected.ir.msl
index 0cdf5de..d612c7b 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/59cc27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/59cc27.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59cc27(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59cc27(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/59eb57.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/59eb57.wgsl.expected.ir.msl
index 8b97f63..559ff77 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/59eb57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/59eb57.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_59eb57(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59eb57(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_59eb57(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_59eb57(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/5ee8f2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/5ee8f2.wgsl.expected.ir.msl
index 2d49907..ea7cec4 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/5ee8f2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/5ee8f2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_5ee8f2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5ee8f2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5ee8f2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_5ee8f2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/5f20d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/5f20d1.wgsl.expected.ir.msl
index 3c4af6c..fdea774 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/5f20d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/5f20d1.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5f20d1(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_5f20d1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/61bd23.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/61bd23.wgsl.expected.ir.msl
index 1aced88..268ec29 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/61bd23.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/61bd23.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_61bd23(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_61bd23(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_61bd23(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_61bd23(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/622aa2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/622aa2.wgsl.expected.ir.msl
index b03fcbd..f849d51 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/622aa2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/622aa2.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_622aa2(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_622aa2(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_622aa2(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_622aa2(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/6b4321.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/6b4321.wgsl.expected.ir.msl
index 2f161fb..5ad0639 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/6b4321.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/6b4321.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6b4321(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6b4321(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/6da0eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/6da0eb.wgsl.expected.ir.msl
index 56e6bfd..e57ddcb 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/6da0eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/6da0eb.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_6da0eb(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6da0eb(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_6da0eb(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_6da0eb(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/77be7b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/77be7b.wgsl.expected.ir.msl
index 067c973..4b20655 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/77be7b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/77be7b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_77be7b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_77be7b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/7895f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/7895f4.wgsl.expected.ir.msl
index 530a112..b396032 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/7895f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/7895f4.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7895f4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7895f4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/7f28cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/7f28cf.wgsl.expected.ir.msl
index f92682d..e9bb83b 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/7f28cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/7f28cf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_7f28cf(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7f28cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_7f28cf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_7f28cf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/8356f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/8356f7.wgsl.expected.ir.msl
index bde6fb7..3804c17 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/8356f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/8356f7.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_8356f7(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8356f7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8356f7(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8356f7(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/878dea.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/878dea.wgsl.expected.ir.msl
index d73fc69..d36d055 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/878dea.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/878dea.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_878dea(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_878dea(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_878dea(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_878dea(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/87faad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/87faad.wgsl.expected.ir.msl
index 2dcabcf..82504e3 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/87faad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/87faad.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_87faad(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_87faad(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_87faad(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_87faad(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/8ac32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/8ac32a.wgsl.expected.ir.msl
index 781596f..cc96d8d 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/8ac32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/8ac32a.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8ac32a(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8ac32a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/8bd987.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/8bd987.wgsl.expected.ir.msl
index 1f6ca9a..9207723 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/8bd987.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/8bd987.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_8bd987(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8bd987(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8bd987(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8bd987(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/8dbf23.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/8dbf23.wgsl.expected.ir.msl
index 65619bb..a6698d1 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/8dbf23.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/8dbf23.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_8dbf23(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8dbf23(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8dbf23(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8dbf23(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/8e1bd0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/8e1bd0.wgsl.expected.ir.msl
index afc7536..ddf3ba7 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/8e1bd0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/8e1bd0.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_8e1bd0(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8e1bd0(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_8e1bd0(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_8e1bd0(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/90b8cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/90b8cc.wgsl.expected.ir.msl
index 6e9de2b..44e74cf 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/90b8cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/90b8cc.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_90b8cc(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_90b8cc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/9695c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/9695c6.wgsl.expected.ir.msl
index a6cfc01..d0f991f 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/9695c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/9695c6.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<uint, access::write> arg_0;
 };
 
 uint textureNumLayers_9695c6(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9695c6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9695c6(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_9695c6(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/98a9cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/98a9cf.wgsl.expected.ir.msl
index 38ec6ca..90e5c04 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/98a9cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/98a9cf.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_98a9cf(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_98a9cf(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_98a9cf(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_98a9cf(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/9c60e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/9c60e3.wgsl.expected.ir.msl
index 29e8707..aae8862 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/9c60e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/9c60e3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9c60e3(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_9c60e3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/a54655.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/a54655.wgsl.expected.ir.msl
index 2f336e8..92e4deb 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/a54655.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/a54655.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_a54655(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a54655(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a54655(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_a54655(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.msl
index 6553094..6c0096c 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a9d3f5(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_a9d3f5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/aac630.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/aac630.wgsl.expected.ir.msl
index fe39eb3..f023429 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/aac630.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/aac630.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_aac630(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_aac630(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_aac630(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_aac630(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/bf2f76.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/bf2f76.wgsl.expected.ir.msl
index 6244f15..5e26c90 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/bf2f76.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/bf2f76.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_bf2f76(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_bf2f76(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/c1eca9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/c1eca9.wgsl.expected.ir.msl
index cfa05fe..7e8b705 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/c1eca9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/c1eca9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_c1eca9(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_c1eca9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/d3e21f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/d3e21f.wgsl.expected.ir.msl
index 7211154..1a300e3 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/d3e21f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/d3e21f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3e21f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3e21f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLayers/d3f655.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/d3f655.wgsl.expected.ir.msl
index 004b002..3f993ed 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/d3f655.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/d3f655.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::read_write> arg_0;
 };
 
 uint textureNumLayers_d3f655(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3f655(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d3f655(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_d3f655(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/d75a0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/d75a0b.wgsl.expected.ir.msl
index 0104cc6..7f102f4 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/d75a0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/d75a0b.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::write> arg_0;
 };
 
 uint textureNumLayers_d75a0b(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d75a0b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_d75a0b(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_d75a0b(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/de8087.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/de8087.wgsl.expected.ir.msl
index 66b6105..92a47b4 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/de8087.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/de8087.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<int, access::write> arg_0;
 };
 
 uint textureNumLayers_de8087(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_de8087(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_de8087(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_de8087(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/e47aac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/e47aac.wgsl.expected.ir.msl
index 209458a..c6c6f48 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/e47aac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/e47aac.wgsl.expected.ir.msl
@@ -2,18 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read_write> arg_0;
   device uint* prevent_dce;
-};
-
-struct VertexOutput {
-  float4 pos;
-  uint prevent_dce;
-};
-
-struct vertex_main_outputs {
-  float4 VertexOutput_pos [[position]];
-  uint VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
+  texture2d_array<float, access::read_write> arg_0;
 };
 
 uint textureNumLayers_e47aac(tint_module_vars_struct tint_module_vars) {
@@ -21,25 +11,12 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_e47aac(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_e47aac(tint_module_vars);
 }
-
-VertexOutput vertex_main_inner(tint_module_vars_struct tint_module_vars) {
-  VertexOutput out = {};
-  out.pos = float4(0.0f);
-  out.prevent_dce = textureNumLayers_e47aac(tint_module_vars);
-  return out;
-}
-
-vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read_write> arg_0 [[texture(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
-  VertexOutput const v = vertex_main_inner(tint_module_vars);
-  return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
-}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/f1783f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLayers/f1783f.wgsl.expected.ir.msl
index 55fa6ea..fb937c4 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/f1783f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLayers/f1783f.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_f1783f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLayers_f1783f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/181090.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/181090.wgsl.expected.ir.msl
index 3139f6b..a03c653 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/181090.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/181090.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_181090(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_181090(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/1a3fa9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/1a3fa9.wgsl.expected.ir.msl
index 837997a..f582b45 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/1a3fa9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/1a3fa9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a3fa9(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a3fa9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/1a7fc3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/1a7fc3.wgsl.expected.ir.msl
index c9440ec..30aae09 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/1a7fc3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/1a7fc3.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a7fc3(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_1a7fc3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/2267d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/2267d8.wgsl.expected.ir.msl
index 64cdb41..5836fbb 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/2267d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/2267d8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2267d8(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2267d8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/24b2c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/24b2c6.wgsl.expected.ir.msl
index b611646..49e6ead 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/24b2c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/24b2c6.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_24b2c6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_24b2c6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/2bea6c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/2bea6c.wgsl.expected.ir.msl
index 55346bf..06e1d1d 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/2bea6c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/2bea6c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depthcube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2bea6c(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2bea6c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/2df1ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/2df1ab.wgsl.expected.ir.msl
index e86b8ac..6f5dbcc 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/2df1ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/2df1ab.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2df1ab(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_2df1ab(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/46dbd8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/46dbd8.wgsl.expected.ir.msl
index bab2eb3..6a6fedb 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/46dbd8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/46dbd8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_46dbd8(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_46dbd8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/60d9b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/60d9b8.wgsl.expected.ir.msl
index 55db78c..683d527 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/60d9b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/60d9b8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture3d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_60d9b8(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_60d9b8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/903920.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/903920.wgsl.expected.ir.msl
index cd39a13..6dd5c33 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/903920.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/903920.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_903920(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_903920(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/9a1a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/9a1a65.wgsl.expected.ir.msl
index f7195d4..160828f 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/9a1a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/9a1a65.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture3d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_9a1a65(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture3d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_9a1a65(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/adc783.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/adc783.wgsl.expected.ir.msl
index 5fe346e..a2e0b65 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/adc783.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/adc783.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_array<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d_array<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_adc783(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_adc783(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/ae911c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/ae911c.wgsl.expected.ir.msl
index e781542..d28ba24 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/ae911c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/ae911c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depth2d_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ae911c(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ae911c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/c386c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/c386c8.wgsl.expected.ir.msl
index 47276be..80b3f96 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/c386c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/c386c8.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c386c8(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c386c8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/c399f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/c399f9.wgsl.expected.ir.msl
index eba6930..3d6cf2d 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/c399f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/c399f9.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c399f9(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c399f9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/c8c25c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/c8c25c.wgsl.expected.ir.msl
index f35af66..fe88698 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/c8c25c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/c8c25c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depthcube<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depthcube<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c8c25c(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_c8c25c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/d63126.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/d63126.wgsl.expected.ir.msl
index db7aa58..87cc3bb 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/d63126.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/d63126.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  depth2d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d63126(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d63126(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/d8f73b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/d8f73b.wgsl.expected.ir.msl
index 49c1304..6b4ae29 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/d8f73b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/d8f73b.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d8f73b(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_d8f73b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/ef7944.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/ef7944.wgsl.expected.ir.msl
index fdb8e6b..c1c8a15 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/ef7944.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/ef7944.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture3d<float, access::sample> arg_0;
   device uint* prevent_dce;
+  texture3d<float, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ef7944(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_ef7944(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/efd6df.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/efd6df.wgsl.expected.ir.msl
index a10199e..f111c88 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/efd6df.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/efd6df.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texture2d<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_efd6df(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_efd6df(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/f742c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/f742c0.wgsl.expected.ir.msl
index 0c2f36e..d4e2788 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/f742c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/f742c0.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture1d<int, access::sample> arg_0;
   device uint* prevent_dce;
+  texture1d<int, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_f742c0(tint_module_vars);
 }
 
-kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture1d<int, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_f742c0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumLevels/fe2171.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumLevels/fe2171.wgsl.expected.ir.msl
index 0a1b5f9..85691ac 100644
--- a/test/tint/builtins/gen/var/textureNumLevels/fe2171.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumLevels/fe2171.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texturecube_array<uint, access::sample> arg_0;
   device uint* prevent_dce;
+  texturecube_array<uint, access::sample> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_fe2171(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumLevels_fe2171(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumSamples/50f399.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumSamples/50f399.wgsl.expected.ir.msl
index a47605b..780a9b4 100644
--- a/test/tint/builtins/gen/var/textureNumSamples/50f399.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumSamples/50f399.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<uint, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_ms<uint, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_50f399(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_50f399(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumSamples/c1a777.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumSamples/c1a777.wgsl.expected.ir.msl
index 4246b6f..b861ba3 100644
--- a/test/tint/builtins/gen/var/textureNumSamples/c1a777.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumSamples/c1a777.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<int, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_ms<int, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_c1a777(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_c1a777(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumSamples/dbb799.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumSamples/dbb799.wgsl.expected.ir.msl
index e5bf2fd..8e9acd7 100644
--- a/test/tint/builtins/gen/var/textureNumSamples/dbb799.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumSamples/dbb799.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  texture2d_ms<float, access::read> arg_0;
   device uint* prevent_dce;
+  texture2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_dbb799(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_dbb799(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureNumSamples/ecd321.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureNumSamples/ecd321.wgsl.expected.ir.msl
index e8812c4..3bd852a 100644
--- a/test/tint/builtins/gen/var/textureNumSamples/ecd321.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureNumSamples/ecd321.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  depth2d_ms<float, access::read> arg_0;
   device uint* prevent_dce;
+  depth2d_ms<float, access::read> arg_0;
 };
 
 struct VertexOutput {
@@ -21,13 +21,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_ecd321(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]], depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0};
   (*tint_module_vars.prevent_dce) = textureNumSamples_ecd321(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.ir.msl
index 88e3e35..bd7aa90 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_0dff6c(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_0dff6c(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl
index 4b1b456..aa91b45 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_17e988(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_17e988(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.ir.msl
index b29c7b9..4ec3685 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_193203(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_193203(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.ir.msl
index adab218..ab1be9f 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_1a4e1b(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_1a4e1b(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.ir.msl
index ce5da62..54b50b9 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_2149ec(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_2149ec(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.ir.msl
index 95627a6..6f00be4 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_38bbb9(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_38bbb9(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.ir.msl
index b6de610..1377c83 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_3b50bd(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_3b50bd(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.ir.msl
index 68c07b9..ea7c42a 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_4703d0(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_4703d0(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl
index 17b00b5..7497d50 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_4dd1bf(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_4dd1bf(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.ir.msl
index bbb0281..7556865 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_51b514(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_51b514(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl
index ef347fb..da34e88 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_60bf45(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_60bf45(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl
index 787cf52..5d4f0c7 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_6717ca(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_6717ca(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.ir.msl
index 79fccd2..79e5ef6 100644
--- a/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture1d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_6e64fb(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture1d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_6e64fb(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl
index 3408461..4b29c08 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_7e9ffd(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_7e9ffd(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.ir.msl
index 76b2e61..311bb46 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_7fd8cb(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_7fd8cb(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.ir.msl
index 0572e14..d3f11fb 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_85c4ba(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_85c4ba(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.ir.msl
index 6986088..2d75a90 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_bc7477(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_bc7477(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl
index 10e0882..af5fd2c 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_c2f4e8(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_c2f4e8(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.ir.msl
index b839320..8cd05ee 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_d6b281(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_d6b281(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.ir.msl
index a8836e3..f3b69d4 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSample_e53267(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_e53267(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.ir.msl
index c3aa2e3..00c9675 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSample_ea7030(tint_module_vars_struct tint_module_vars) {
@@ -13,7 +13,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSample_ea7030(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
index a0932d3..fa4ac0c 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
@@ -30,11 +30,11 @@
 };
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0_plane0;
   texture2d<float, access::sample> arg_0_plane1;
   const constant tint_ExternalTextureParams* arg_0_params;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -86,13 +86,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_7c04e6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_7c04e6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
index ff84cc2..0ec954a 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_9ca02c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBaseClampToEdge_9ca02c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.msl
index 26b2a7a..0caae1e 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_1c707e(tint_module_vars_struct tint_module_vars) {
@@ -17,7 +17,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_1c707e(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.msl
index 2ffa8c6..ee058d1 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_53b9f7(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_53b9f7(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.msl
index aa64f26..d6c7484 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_594824(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_594824(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.msl
index 2821499..375c4c8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_6a9113(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_6a9113(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl
index 7d31e34..79bf641 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_80e579(tint_module_vars_struct tint_module_vars) {
@@ -17,7 +17,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_80e579(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.msl
index d5b9367..9b236d1 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_87915c(tint_module_vars_struct tint_module_vars) {
@@ -17,7 +17,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_87915c(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl
index bd9ea38..ab540ae 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_9dbb51(tint_module_vars_struct tint_module_vars) {
@@ -17,7 +17,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_9dbb51(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.msl
index 5a0aa99..360f4df 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_a161cf(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_a161cf(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.msl
index 82d9e62..7aec3c1 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_c6953d(tint_module_vars_struct tint_module_vars) {
@@ -17,7 +17,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_c6953d(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.msl
index 6622492..1fd4845 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_d3fa1b(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_d3fa1b(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl
index 8e12b27..5f87461 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 float4 textureSampleBias_eed7c4(tint_module_vars_struct tint_module_vars) {
@@ -17,7 +17,7 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleBias_eed7c4(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.msl
index 9dee32a..53f0f24 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_1912e5(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_1912e5(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.msl
index a3f9f76..58e40fa 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_3a5923(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_3a5923(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.msl
index 5c28443..3c79a54 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_63fb83(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_63fb83(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.msl
index 8eb326c..7a2c730 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_7b5025(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_7b5025(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.msl
index c4ea244..34c89ea 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_90ae56(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_90ae56(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
index 23df527..fae0ad9 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_a3ca7e(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_a3ca7e(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl
index f17d98e..5cdb57e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_af1051(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_af1051(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl
index 96cd352..680526d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_dd431d(tint_module_vars_struct tint_module_vars) {
@@ -15,7 +15,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_dd431d(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.msl
index 06ee73f..fab13cc 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 float textureSampleCompare_dec064(tint_module_vars_struct tint_module_vars) {
@@ -14,7 +14,7 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompare_dec064(tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
index 0d6c646..523b58d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1116ed(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1116ed(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl
index 65f5803..f12d3ce 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1568e3(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_1568e3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl
index 05f7316..9e89b39 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_2ad2b1(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_2ad2b1(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
index cc9f113..59094aa 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_4cf3a2(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_4cf3a2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl
index 422e98c..f1ca4f3 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7dc3c0(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7dc3c0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl
index cedbecb..a6823fb 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7f2b9a(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_7f2b9a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl
index 4ea2b63..e306aae 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_958c87(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_958c87(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
index 8ebb5c8..549d6a7 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_b6e47c(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_b6e47c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl
index 7936b2a..f419bbc 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_bcb3dd(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleCompareLevel_bcb3dd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.ir.msl
index c972db5..ed26ce2 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_21402b(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_21402b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
index e51d932..cf60369 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_2ecd8f(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_2ecd8f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.ir.msl
index 4dff4b1..e11b4ed 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_521263(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_521263(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.ir.msl
index 8af26dc..a4470e1 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5312f4(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5312f4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.ir.msl
index bbfc493..f3d48f1 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5884dd(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_5884dd(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.ir.msl
index 4b2d3f0..6e71c99 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_7cd6de(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_7cd6de(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.ir.msl
index 95c3e68..7c36e6a 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_a09131(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_a09131(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.ir.msl
index 764a77f..b0347b9 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_bbb58f(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_bbb58f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl
index 269dfc6..ec945b1 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -26,13 +26,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d4e3c5(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d4e3c5(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl
index e85de96..6919b66 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d65515(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_d65515(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl
index e7c55c4..adb7f99 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -28,13 +28,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_e383db(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleGrad_e383db(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.ir.msl
index 34a2929..4d995fa 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_02be59(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_02be59(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl
index fb40f71..af3c5ce 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0b0a1b(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0b0a1b(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
index f382b9c..5cd60cf 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0bdd9a(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_0bdd9a(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.ir.msl
index 956ed1c..3a54938 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1b0291(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1b0291(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
index 8fd7e2f..5006dcc 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1bf73e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_1bf73e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.ir.msl
index 271f8f1..ac8a060 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_265cc7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_265cc7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl
index 714fb46..e517d93 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_2974eb(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_2974eb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl
index 1f35c36..62425d1 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_302be4(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_302be4(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl
index ebb91f5..5d3dca9 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36780e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36780e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
index 010cdbd..df5de67 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36f0d3(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_36f0d3(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.ir.msl
index fd3d135..c2c3b60 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_3c3442(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_3c3442(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.ir.msl
index b12b1f5..e256fea 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_615583(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_615583(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.ir.msl
index 084e204..63b8f57 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_73e892(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_73e892(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.ir.msl
index 665a195..743855f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_749baf(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_749baf(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.ir.msl
index 587be4d..05c9a9b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_941a53(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_941a53(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl
index 76e2554..6d82e71 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_a12142(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_a12142(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.ir.msl
index e7db11d..d270ddc 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_aab3b9(tint_module_vars);
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_aab3b9(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.ir.msl
index cde0d32..dbeb744 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_abfcc0(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_abfcc0(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
index fb95712..9ec01a8 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae5e39(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae5e39(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.ir.msl
index 6e54fc5..2f4812c 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae92a2(tint_module_vars);
 }
 
-kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ae92a2(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
index 9ce1f010b..ce79e74 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_b7c55c(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_b7c55c(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.ir.msl
index cfaaada..b1d39f0 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texturecube<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c32df7(tint_module_vars);
 }
 
-kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texturecube<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c32df7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.ir.msl
index 9b24ca2..7e634d5 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c6aca6(tint_module_vars);
 }
 
-kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_c6aca6(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl
index 80e2301..2c99452 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_cdfe0f(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_cdfe0f(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.ir.msl
index 196c9bf..566913f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture3d<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_dcbecb(tint_module_vars);
 }
 
-kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture3d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_dcbecb(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl
index dc12643..d6057d6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_e6ce9e(tint_module_vars);
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_e6ce9e(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl
index 66391b8..66b0dc5 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depth2d<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -25,13 +25,13 @@
   return res;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_f3b2c8(tint_module_vars);
 }
 
-kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depth2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_f3b2c8(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.ir.msl
index eda7850..bc8749f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float4* prevent_dce;
   texture2d_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float4* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_faa6d7(tint_module_vars);
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float4* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]], texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_faa6d7(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.ir.msl
index 98f9b23..6bd4e08 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.ir.msl
@@ -2,9 +2,9 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
+  device float* prevent_dce;
   depthcube_array<float, access::sample> arg_0;
   sampler arg_1;
-  device float* prevent_dce;
 };
 
 struct VertexOutput {
@@ -27,13 +27,13 @@
   return res;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ff11bc(tint_module_vars);
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
+kernel void compute_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
   (*tint_module_vars.prevent_dce) = textureSampleLevel_ff11bc(tint_module_vars);
 }
 
diff --git a/test/tint/builtins/gen/var/unpack4xI8/830900.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/unpack4xI8/830900.wgsl.expected.ir.msl
index 9aa3ccd..48edb14 100644
--- a/test/tint/builtins/gen/var/unpack4xI8/830900.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/unpack4xI8/830900.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
-}
-
-%unpack4xI8_830900 = func():void {
-  $B2: {
-    %arg_0:ptr<function, u32, read_write> = var, 1u
-    %4:u32 = load %arg_0
-    %5:vec4<i32> = unpack4xI8 %4
-    %res:ptr<function, vec4<i32>, read_write> = var, %5
-    %7:vec4<i32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %unpack4xI8_830900
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %unpack4xI8_830900
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %unpack4xI8_830900
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: unpack4xI8
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/unpack4xU8/a5ea55.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/unpack4xU8/a5ea55.wgsl.expected.ir.msl
index c483088..11cffd1 100644
--- a/test/tint/builtins/gen/var/unpack4xU8/a5ea55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/unpack4xU8/a5ea55.wgsl.expected.ir.msl
@@ -1,40 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
-}
-
-%unpack4xU8_a5ea55 = func():void {
-  $B2: {
-    %arg_0:ptr<function, u32, read_write> = var, 1u
-    %4:u32 = load %arg_0
-    %5:vec4<u32> = unpack4xU8 %4
-    %res:ptr<function, vec4<u32>, read_write> = var, %5
-    %7:vec4<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
-}
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %unpack4xU8_a5ea55
-    ret vec4<f32>(0.0f)
-  }
-}
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %unpack4xU8_a5ea55
-    ret
-  }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %unpack4xU8_a5ea55
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: unpack4xU8
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
index 7363275..d90a15f 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/37307c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup uint* arg_0;
   device uint* prevent_dce;
+  threadgroup uint* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_37307c(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device uint* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device uint* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
index d3bf46d..faffffa 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/7a857c.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup float* arg_0;
   device float* prevent_dce;
+  threadgroup float* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_7a857c(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device float* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device float* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
index e4eaff7..a304788 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/9d33de.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup int* arg_0;
   device int* prevent_dce;
+  threadgroup int* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_9d33de(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device int* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
index e23c148..89750d6 100644
--- a/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/workgroupUniformLoad/e07d08.wgsl.expected.ir.msl
@@ -2,8 +2,8 @@
 using namespace metal;
 
 struct tint_module_vars_struct {
-  threadgroup half* arg_0;
   device half* prevent_dce;
+  threadgroup half* arg_0;
 };
 
 struct tint_symbol_1 {
@@ -26,7 +26,7 @@
   (*tint_module_vars.prevent_dce) = workgroupUniformLoad_e07d08(tint_module_vars);
 }
 
-kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device half* prevent_dce [[buffer(0)]]) {
-  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
+kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], device half* prevent_dce [[buffer(0)]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=(&(*v_1).tint_symbol)};
   compute_main_inner(tint_local_index, tint_module_vars);
 }
diff --git a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl
+++ b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl
index edd7e27e..9a4469c 100644
--- a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl
+++ b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:924 internal compiler error: TINT_UNREACHABLE unhandled: modf
+../../src/tint/lang/msl/writer/printer/printer.cc:989 internal compiler error: TINT_UNREACHABLE unhandled: modf
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.msl
index daa7f40..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.msl
@@ -1,38 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%pos:vec4<f32> [@position]):void {
-  $B2: {
-    %4:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %5:f32 = access %pos, 0u
-    %6:u32 = call %tint_f32_to_u32, %5
-    %8:u32 = load %4
-    %9:u32 = add %8, %6
-    store %4, %9
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %11:u32 = convert %value
-    %12:bool = gte %value, 0.0f
-    %13:u32 = select 0u, %11, %12
-    %14:bool = lte %value, 4294967040.0f
-    %15:u32 = select 4294967295u, %13, %14
-    ret %15
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.msl
index 0fbaef7..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.msl
@@ -1,42 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%pos:vec4<f32> [@position], %uv:vec4<f32> [@location(0)]):void {
-  $B2: {
-    %5:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %6:f32 = access %pos, 0u
-    %7:u32 = call %tint_f32_to_u32, %6
-    %9:u32 = let %7
-    %10:f32 = access %uv, 0u
-    %11:u32 = call %tint_f32_to_u32, %10
-    %12:u32 = add %9, %11
-    %13:u32 = load %5
-    %14:u32 = add %13, %12
-    store %5, %14
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %16:u32 = convert %value
-    %17:bool = gte %value, 0.0f
-    %18:u32 = select 0u, %16, %17
-    %19:bool = lte %value, 4294967040.0f
-    %20:u32 = select 4294967295u, %18, %19
-    ret %20
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.msl
index 01f4152..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.msl
@@ -1,46 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-In = struct @align(16) {
-  uv:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%pos:vec4<f32> [@position], %in:In):void {
-  $B2: {
-    %5:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %6:f32 = access %pos, 0u
-    %7:u32 = call %tint_f32_to_u32, %6
-    %9:u32 = let %7
-    %10:f32 = access %in, 0u, 0u
-    %11:u32 = call %tint_f32_to_u32, %10
-    %12:u32 = add %9, %11
-    %13:u32 = load %5
-    %14:u32 = add %13, %12
-    store %5, %14
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %16:u32 = convert %value
-    %17:bool = gte %value, 0.0f
-    %18:u32 = select 0u, %16, %17
-    %19:bool = lte %value, 4294967040.0f
-    %20:u32 = select 4294967295u, %18, %19
-    ret %20
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.msl
index 1a5f2b1..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.msl
@@ -1,42 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-In = struct @align(16) {
-  pos:vec4<f32> @offset(0), @builtin(position)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%in:In):void {
-  $B2: {
-    %4:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %5:f32 = access %in, 0u, 0u
-    %6:u32 = call %tint_f32_to_u32, %5
-    %8:u32 = load %4
-    %9:u32 = add %8, %6
-    store %4, %9
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %11:u32 = convert %value
-    %12:bool = gte %value, 0.0f
-    %13:u32 = select 0u, %11, %12
-    %14:bool = lte %value, 4294967040.0f
-    %15:u32 = select 4294967295u, %13, %14
-    ret %15
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.msl
index cc9f265..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.msl
@@ -1,46 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-In = struct @align(16) {
-  pos:vec4<f32> @offset(0), @builtin(position)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%in:In, %uv:vec4<f32> [@location(0)]):void {
-  $B2: {
-    %5:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %6:f32 = access %in, 0u, 0u
-    %7:u32 = call %tint_f32_to_u32, %6
-    %9:u32 = let %7
-    %10:f32 = access %uv, 0u
-    %11:u32 = call %tint_f32_to_u32, %10
-    %12:u32 = add %9, %11
-    %13:u32 = load %5
-    %14:u32 = add %13, %12
-    store %5, %14
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %16:u32 = convert %value
-    %17:bool = gte %value, 0.0f
-    %18:u32 = select 0u, %16, %17
-    %19:bool = lte %value, 4294967040.0f
-    %20:u32 = select 4294967295u, %18, %19
-    ret %20
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.msl
index 2a1a2d6..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.msl
@@ -1,47 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-In = struct @align(16) {
-  pos:vec4<f32> @offset(0), @builtin(position)
-  uv:vec4<f32> @offset(16), @location(0)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%in:In):void {
-  $B2: {
-    %4:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %5:f32 = access %in, 0u, 0u
-    %6:u32 = call %tint_f32_to_u32, %5
-    %8:u32 = let %6
-    %9:f32 = access %in, 1u, 0u
-    %10:u32 = call %tint_f32_to_u32, %9
-    %11:u32 = add %8, %10
-    %12:u32 = load %4
-    %13:u32 = add %12, %11
-    store %4, %13
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %15:u32 = convert %value
-    %16:bool = gte %value, 0.0f
-    %17:u32 = select 0u, %15, %16
-    %18:bool = lte %value, 4294967040.0f
-    %19:u32 = select 4294967295u, %17, %18
-    ret %19
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.msl
index 202fd6e..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.msl
@@ -1,38 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%pos:vec4<f32> [@invariant, @position]):void {
-  $B2: {
-    %4:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %5:f32 = access %pos, 0u
-    %6:u32 = call %tint_f32_to_u32, %5
-    %8:u32 = load %4
-    %9:u32 = add %8, %6
-    store %4, %9
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %11:u32 = convert %value
-    %12:bool = gte %value, 0.0f
-    %13:u32 = select 0u, %11, %12
-    %14:bool = lte %value, 4294967040.0f
-    %15:u32 = select 4294967295u, %13, %14
-    ret %15
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.msl
index 25b2032..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.msl
@@ -1,42 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-In = struct @align(16) {
-  pos:vec4<f32> @offset(0), @invariant, @builtin(position)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%in:In):void {
-  $B2: {
-    %4:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %5:f32 = access %in, 0u, 0u
-    %6:u32 = call %tint_f32_to_u32, %5
-    %8:u32 = load %4
-    %9:u32 = add %8, %6
-    store %4, %9
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %11:u32 = convert %value
-    %12:bool = gte %value, 0.0f
-    %13:u32 = select 0u, %11, %12
-    %14:bool = lte %value, 4294967040.0f
-    %15:u32 = select 4294967295u, %13, %14
-    ret %15
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.msl
index 2eec7ef..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.msl
@@ -1,42 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%a:vec4<f32> [@location(0)], %b:vec4<f32> [@location(1), @interpolate(flat)]):void {
-  $B2: {
-    %5:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %6:f32 = access %a, 0u
-    %7:u32 = call %tint_f32_to_u32, %6
-    %9:u32 = let %7
-    %10:f32 = access %b, 1u
-    %11:u32 = call %tint_f32_to_u32, %10
-    %12:u32 = add %9, %11
-    %13:u32 = load %5
-    %14:u32 = add %13, %12
-    store %5, %14
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %16:u32 = convert %value
-    %17:bool = gte %value, 0.0f
-    %18:u32 = select 0u, %16, %17
-    %19:bool = lte %value, 4294967040.0f
-    %20:u32 = select 4294967295u, %18, %19
-    ret %20
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.msl
index 9dcd924..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.msl
@@ -1,47 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-In = struct @align(16) {
-  a:vec4<f32> @offset(0), @location(0)
-  b:vec4<f32> @offset(16), @location(1), @interpolate(flat)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func(%in:In):void {
-  $B2: {
-    %4:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %5:f32 = access %in, 0u, 0u
-    %6:u32 = call %tint_f32_to_u32, %5
-    %8:u32 = let %6
-    %9:f32 = access %in, 1u, 1u
-    %10:u32 = call %tint_f32_to_u32, %9
-    %11:u32 = add %8, %10
-    %12:u32 = load %4
-    %13:u32 = add %12, %11
-    store %4, %13
-    ret
-  }
-}
-%tint_f32_to_u32 = func(%value:f32):u32 {
-  $B3: {
-    %15:u32 = convert %value
-    %16:bool = gte %value, 0.0f
-    %17:u32 = select 0u, %15, %16
-    %18:bool = lte %value, 4294967040.0f
-    %19:u32 = select 4294967295u, %17, %18
-    ret %19
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl
index fac2676..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl
@@ -1,32 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-Out = struct @align(16) {
-  x:vec4<f32> @offset(0), @location(0)
-  y:vec4<f32> @offset(16), @location(2)
-  z:vec4<f32> @offset(32), @location(4)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():Out {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 42u
-    store %3, %5
-    ret Out(vec4<f32>(10.0f), vec4<f32>(20.0f), vec4<f32>(30.0f))
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl
index 0bc6ae6..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl
@@ -1,30 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-Out = struct @align(16) {
-  x:vec4<f32> @offset(0), @location(0)
-  y:vec4<f32> @offset(16), @location(2)
-  z:vec4<f32> @offset(32), @location(3)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():Out {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 42u
-    store %3, %5
-    ret Out(vec4<f32>(10.0f), vec4<f32>(20.0f), vec4<f32>(30.0f))
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.msl
index d347bf0..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():vec4<f32> [@location(0)] {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 42u
-    store %3, %5
-    ret vec4<f32>(2.0f)
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.msl
index e156d14..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.msl
@@ -1,24 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():vec4<f32> [@location(0)] {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 42u
-    store %3, %5
-    ret vec4<f32>(2.0f)
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl
index 8a944e4..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl
@@ -1,26 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 42u
-    store %3, %5
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.msl
index 9238a99..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.msl
@@ -1,24 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 42u
-    store %3, %5
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl
index e5098f2..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.msl
@@ -1,58 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-Out = struct @align(16) {
-  x:vec4<f32> @offset(0), @location(0)
-  y:vec4<f32> @offset(16), @location(2)
-  z:vec4<f32> @offset(32), @location(4)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f0 = func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 9u
-    store %3, %5
-    ret
-  }
-}
-%f1 = func():void {
-  $B3: {
-    %7:void = call %f0
-    %8:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %9:u32 = load %8
-    %10:u32 = add %9, 8u
-    store %8, %10
-    ret
-  }
-}
-%f2 = func():void {
-  $B4: {
-    %12:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %13:u32 = load %12
-    %14:u32 = add %13, 7u
-    store %12, %14
-    %15:void = call %f1
-    ret
-  }
-}
-%f = @fragment func():Out {
-  $B5: {
-    %17:void = call %f2
-    ret Out(vec4<f32>(10.0f), vec4<f32>(20.0f), vec4<f32>(30.0f))
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl
index 4c01294..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.msl
@@ -1,56 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-Out = struct @align(16) {
-  x:vec4<f32> @offset(0), @location(0)
-  y:vec4<f32> @offset(16), @location(2)
-  z:vec4<f32> @offset(32), @location(3)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f0 = func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 9u
-    store %3, %5
-    ret
-  }
-}
-%f1 = func():void {
-  $B3: {
-    %7:void = call %f0
-    %8:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %9:u32 = load %8
-    %10:u32 = add %9, 8u
-    store %8, %10
-    ret
-  }
-}
-%f2 = func():void {
-  $B4: {
-    %12:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %13:u32 = load %12
-    %14:u32 = add %13, 7u
-    store %12, %14
-    %15:void = call %f1
-    ret
-  }
-}
-%f = @fragment func():Out {
-  $B5: {
-    %17:void = call %f2
-    ret Out(vec4<f32>(10.0f), vec4<f32>(20.0f), vec4<f32>(30.0f))
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.msl
index e834677..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.msl
@@ -1,52 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f0 = func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 9u
-    store %3, %5
-    ret
-  }
-}
-%f1 = func():void {
-  $B3: {
-    %7:void = call %f0
-    %8:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %9:u32 = load %8
-    %10:u32 = add %9, 8u
-    store %8, %10
-    ret
-  }
-}
-%f2 = func():void {
-  $B4: {
-    %12:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %13:u32 = load %12
-    %14:u32 = add %13, 7u
-    store %12, %14
-    %15:void = call %f1
-    ret
-  }
-}
-%f = @fragment func():vec4<f32> [@location(0)] {
-  $B5: {
-    %17:void = call %f2
-    ret vec4<f32>(2.0f)
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.msl
index f43997e..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.msl
@@ -1,50 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f0 = func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 9u
-    store %3, %5
-    ret
-  }
-}
-%f1 = func():void {
-  $B3: {
-    %7:void = call %f0
-    %8:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %9:u32 = load %8
-    %10:u32 = add %9, 8u
-    store %8, %10
-    ret
-  }
-}
-%f2 = func():void {
-  $B4: {
-    %12:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %13:u32 = load %12
-    %14:u32 = add %13, 7u
-    store %12, %14
-    %15:void = call %f1
-    ret
-  }
-}
-%f = @fragment func():vec4<f32> [@location(0)] {
-  $B5: {
-    %17:void = call %f2
-    ret vec4<f32>(2.0f)
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl
index 7de01ba..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.msl
@@ -1,52 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-  b:i32 @offset(4)
-  c:f32 @offset(8)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f0 = func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 9u
-    store %3, %5
-    ret
-  }
-}
-%f1 = func():void {
-  $B3: {
-    %7:void = call %f0
-    %8:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %9:u32 = load %8
-    %10:u32 = add %9, 8u
-    store %8, %10
-    ret
-  }
-}
-%f2 = func():void {
-  $B4: {
-    %12:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %13:u32 = load %12
-    %14:u32 = add %13, 7u
-    store %12, %14
-    %15:void = call %f1
-    ret
-  }
-}
-%f = @fragment func():void {
-  $B5: {
-    %17:void = call %f2
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.msl
index 709ddbe..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.msl
@@ -1,50 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-$B1: {  # root
-  %P:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f0 = func():void {
-  $B2: {
-    %3:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %4:u32 = load %3
-    %5:u32 = add %4, 9u
-    store %3, %5
-    ret
-  }
-}
-%f1 = func():void {
-  $B3: {
-    %7:void = call %f0
-    %8:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %9:u32 = load %8
-    %10:u32 = add %9, 8u
-    store %8, %10
-    ret
-  }
-}
-%f2 = func():void {
-  $B4: {
-    %12:ptr<pixel_local, u32, read_write> = access %P, 0u
-    %13:u32 = load %12
-    %14:u32 = add %13, 7u
-    store %12, %14
-    %15:void = call %f1
-    ret
-  }
-}
-%f = @fragment func():void {
-  $B5: {
-    %17:void = call %f2
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.msl b/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.msl
index e8d531e..76e0d7b 100644
--- a/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.msl
+++ b/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.msl
@@ -1,23 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: PixelLocal = struct @align(4) {
-  a:u32 @offset(0)
-}
-
-$B1: {  # root
-  %V:ptr<pixel_local, PixelLocal, read_write> = var
-}
-
-%f = @fragment func():void {
-  $B2: {
-    %p:ptr<pixel_local, PixelLocal, read_write> = let %V
-    %4:ptr<pixel_local, u32, read_write> = access %p, 0u
-    store %4, 42u
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: pixel_local
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/a.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/a.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/additional_params/a.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/a.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/b.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/b.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/additional_params/b.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/b.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/c.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/c.wgsl.expected.ir.msl
index 0871e97..5cb271d 100644
--- a/test/tint/extensions/texel_fetch/additional_params/c.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/c.wgsl.expected.ir.msl
@@ -1,27 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:1257 internal compiler error: In = struct @align(16) {
-  pos:vec4<f32> @offset(0), @builtin(position)
-  uv:vec4<f32> @offset(16), @location(0)
-  fbf:vec4<f32> @offset(32)
-}
-
-%g = func(%a:f32, %b:f32, %c:f32):void {
-  $B1: {
-    ret
-  }
-}
-%f = @fragment func(%in:In):void {
-  $B2: {
-    %7:f32 = access %in, 0u, 0u
-    %8:f32 = access %in, 1u, 0u
-    %9:f32 = access %in, 2u, 1u
-    %10:void = call %g, %7, %8, %9
-    ret
-  }
-}
-
-invalid entry point IO struct uses
+../../src/tint/utils/containers/slice.h:216 internal compiler error: TINT_ASSERT(i < Length())
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/d.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/d.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/additional_params/d.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/d.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/e.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/e.wgsl.expected.ir.msl
index 45e271b..5cb271d 100644
--- a/test/tint/extensions/texel_fetch/additional_params/e.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/e.wgsl.expected.ir.msl
@@ -1,21 +1,9 @@
 SKIP: FAILED
 
-#include <metal_stdlib>
-using namespace metal;
-struct In {
-  int4 fbf;
-  float4 pos [[position]];
-};
-
-void g(int a, float b) {
-}
-fragment void f(In in) {
-  g(in.fbf[3u], in.pos[0u]);
-}
-program_source:10:17: error: invalid type 'In' for input declaration in a fragment function
-fragment void f(In in) {
-                ^~~~~
-program_source:5:3: note: type 'float4' (vector of 4 'float' values) cannot be used in struct of resources/colors
-  float4 pos [[position]];
-  ^
-
+../../src/tint/utils/containers/slice.h:216 internal compiler error: TINT_ASSERT(i < Length())
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/extensions/texel_fetch/additional_params/f.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/f.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/additional_params/f.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/f.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/g.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/g.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/additional_params/g.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/g.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/h.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/h.wgsl.expected.ir.msl
index 59f332f..5cb271d 100644
--- a/test/tint/extensions/texel_fetch/additional_params/h.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/h.wgsl.expected.ir.msl
@@ -1,24 +1,9 @@
 SKIP: FAILED
 
-#include <metal_stdlib>
-using namespace metal;
-struct FBF {
-  float4 c1;
-  int4 c3;
-};
-
-void g(float a, float b, int c) {
-}
-fragment void f(float4 pos [[position]], FBF fbf) {
-  g(fbf.c1[0u], pos[1u], fbf.c3[2u]);
-}
-program_source:10:42: error: invalid type 'FBF' for input declaration in a fragment function
-fragment void f(float4 pos [[position]], FBF fbf) {
-                                         ^~~~~~~
-program_source:4:10: note: 'color' attribute must be made explicit
-  float4 c1;
-         ^
-program_source:5:8: note: 'color' attribute must be made explicit
-  int4 c3;
-       ^
-
+../../src/tint/utils/containers/slice.h:216 internal compiler error: TINT_ASSERT(i < Length())
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/extensions/texel_fetch/additional_params/i.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/i.wgsl.expected.ir.msl
index c3951f8..5cb271d 100644
--- a/test/tint/extensions/texel_fetch/additional_params/i.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/i.wgsl.expected.ir.msl
@@ -1,27 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:1257 internal compiler error: In = struct @align(16) {
-  a:vec4<f32> @offset(0), @location(0)
-  b:vec4<f32> @offset(16), @location(1), @interpolate(flat)
-  fbf:vec4<i32> @offset(32)
-}
-
-%g = func(%a:f32, %b:f32, %c:i32):void {
-  $B1: {
-    ret
-  }
-}
-%f = @fragment func(%in:In):void {
-  $B2: {
-    %7:f32 = access %in, 0u, 0u
-    %8:f32 = access %in, 1u, 1u
-    %9:i32 = access %in, 2u, 0u
-    %10:void = call %g, %7, %8, %9
-    ret
-  }
-}
-
-invalid entry point IO struct uses
+../../src/tint/utils/containers/slice.h:216 internal compiler error: TINT_ASSERT(i < Length())
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/additional_params/j.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/additional_params/j.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/additional_params/j.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/additional_params/j.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/multiple_outputs/multiple_inputs.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/multiple_outputs/multiple_inputs.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/multiple_outputs/multiple_inputs.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/multiple_outputs/multiple_inputs.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/multiple_outputs/single_input.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/multiple_outputs/single_input.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/multiple_outputs/single_input.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/multiple_outputs/single_input.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/one_output/multiple_inputs.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/one_output/multiple_inputs.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/one_output/multiple_inputs.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/one_output/multiple_inputs.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/one_output/single_input.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/one_output/single_input.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/one_output/single_input.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/one_output/single_input.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/zero_outputs/multiple_inputs.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/zero_outputs/multiple_inputs.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/zero_outputs/multiple_inputs.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/zero_outputs/multiple_inputs.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/extensions/texel_fetch/zero_outputs/single_input.wgsl.expected.ir.msl b/test/tint/extensions/texel_fetch/zero_outputs/single_input.wgsl.expected.ir.msl
index 814dc06..b8b4fc8 100644
--- a/test/tint/extensions/texel_fetch/zero_outputs/single_input.wgsl.expected.ir.msl
+++ b/test/tint/extensions/texel_fetch/zero_outputs/single_input.wgsl.expected.ir.msl
@@ -1,6 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:384 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
+../../src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc:371 internal compiler error: TINT_UNIMPLEMENTED IR does not currently support texel fetch extension
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/shadowing/struct/let.wgsl.expected.ir.msl b/test/tint/shadowing/struct/let.wgsl.expected.ir.msl
index b9a8650..de13c82 100644
--- a/test/tint/shadowing/struct/let.wgsl.expected.ir.msl
+++ b/test/tint/shadowing/struct/let.wgsl.expected.ir.msl
@@ -2,58 +2,32 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct a {
   int a;
 };
 
 void f() {
+  a const a_1 = a{};
+  a const b = a_1;
   a const a = a{};
-  a const b = a;
-  a const a = a{};
-  a const b = a;
+  a const b_1 = a;
 }
-program_source:8:16: error: expected ';' at end of declaration
+program_source:11:16: error: expected ';' at end of declaration
   a const a = a{};
                ^
                ;
-program_source:9:4: error: expected ';' after expression
-  a const b = a;
+program_source:12:4: error: expected ';' after expression
+  a const b_1 = a;
    ^
    ;
-program_source:9:11: error: C++ requires a type specifier for all declarations
-  a const b = a;
+program_source:12:11: error: C++ requires a type specifier for all declarations
+  a const b_1 = a;
     ~~~~~ ^
-program_source:10:4: error: expected ';' after expression
-  a const a = a{};
-   ^
-   ;
-program_source:10:11: error: must use 'struct' tag to refer to type 'a' in this scope
-  a const a = a{};
-          ^
-          struct 
-program_source:8:11: note: struct 'a' is hidden by a non-type declaration of 'a' here
-  a const a = a{};
-          ^
-program_source:10:13: error: expected unqualified-id
-  a const a = a{};
-            ^
-program_source:11:4: error: expected ';' after expression
-  a const b = a;
-   ^
-   ;
-program_source:11:11: error: C++ requires a type specifier for all declarations
-  a const b = a;
-    ~~~~~ ^
-program_source:8:15: warning: variable 'a' is uninitialized when used within its own initialization [-Wuninitialized]
+program_source:11:15: warning: variable 'a' is uninitialized when used within its own initialization [-Wuninitialized]
   a const a = a{};
           ~   ^
-program_source:9:3: warning: expression result unused [-Wunused-value]
-  a const b = a;
-  ^
-program_source:10:3: warning: expression result unused [-Wunused-value]
-  a const a = a{};
-  ^
-program_source:11:3: warning: expression result unused [-Wunused-value]
-  a const b = a;
+program_source:12:3: warning: expression result unused [-Wunused-value]
+  a const b_1 = a;
   ^
 
diff --git a/test/tint/shadowing/struct/param.wgsl.expected.ir.msl b/test/tint/shadowing/struct/param.wgsl.expected.ir.msl
index 30d3088..82f3eed 100644
--- a/test/tint/shadowing/struct/param.wgsl.expected.ir.msl
+++ b/test/tint/shadowing/struct/param.wgsl.expected.ir.msl
@@ -2,6 +2,7 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct a {
   int a;
 };
@@ -9,14 +10,14 @@
 void f(a a) {
   a const b = a;
 }
-program_source:8:4: error: expected ';' after expression
+program_source:9:4: error: expected ';' after expression
   a const b = a;
    ^
    ;
-program_source:8:11: error: C++ requires a type specifier for all declarations
+program_source:9:11: error: C++ requires a type specifier for all declarations
   a const b = a;
     ~~~~~ ^
-program_source:8:3: warning: expression result unused [-Wunused-value]
+program_source:9:3: warning: expression result unused [-Wunused-value]
   a const b = a;
   ^
 
diff --git a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl
index 764b348..4ab3cb3 100644
--- a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl
+++ b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.msl
@@ -3,29 +3,36 @@
 #include <metal_stdlib>
 using namespace metal;
 
-thread int a = 0;
-thread float b = 0.0f;
-void foo(int maybe_zero) {
-  a = tint_div_i32(a, 0);
-  a = tint_mod_i32(a, 0);
-  a = tint_div_i32(a, maybe_zero);
-  a = tint_mod_i32(a, maybe_zero);
-  b = (b / 0.0f);
-  b = (b % 0.0f);
-  b = (b / float(maybe_zero));
-  b = (b % float(maybe_zero));
-}
-int tint_div_i32(int lhs, int rhs) {
-  return (lhs / select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1)))));
-}
+struct tint_module_vars_struct {
+  thread int* a;
+  thread float* b;
+};
+
 int tint_mod_i32(int lhs, int rhs) {
   int const v = select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1))));
   return (lhs - ((lhs / v) * v));
 }
-program_source:4:12: error: program scope variable must reside in constant address space
-thread int a = 0;
-           ^
-program_source:5:14: error: program scope variable must reside in constant address space
-thread float b = 0.0f;
-             ^
+
+int tint_div_i32(int lhs, int rhs) {
+  return (lhs / select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1)))));
+}
+
+void foo(int maybe_zero, tint_module_vars_struct tint_module_vars) {
+  (*tint_module_vars.a) = tint_div_i32((*tint_module_vars.a), 0);
+  (*tint_module_vars.a) = tint_mod_i32((*tint_module_vars.a), 0);
+  (*tint_module_vars.a) = tint_div_i32((*tint_module_vars.a), maybe_zero);
+  (*tint_module_vars.a) = tint_mod_i32((*tint_module_vars.a), maybe_zero);
+  (*tint_module_vars.b) = ((*tint_module_vars.b) / 0.0f);
+  (*tint_module_vars.b) = ((*tint_module_vars.b) % 0.0f);
+  float const v_1 = float(maybe_zero);
+  (*tint_module_vars.b) = ((*tint_module_vars.b) / v_1);
+  float const v_2 = float(maybe_zero);
+  (*tint_module_vars.b) = ((*tint_module_vars.b) % v_2);
+}
+program_source:24:50: error: invalid operands to binary expression ('float' and 'float')
+  (*tint_module_vars.b) = ((*tint_module_vars.b) % 0.0f);
+                           ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
+program_source:28:50: error: invalid operands to binary expression ('float' and 'const float')
+  (*tint_module_vars.b) = ((*tint_module_vars.b) % v_2);
+                           ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
 
diff --git a/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl
index 026985c..c9652ff 100644
--- a/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl
+++ b/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl
@@ -2,6 +2,7 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct tint_symbol_outputs {
   float4 tint_symbol_1 [[position]] TINT_INVARIANT;
 };
@@ -9,10 +10,11 @@
 float4 tint_symbol_inner() {
   return float4(0.0f);
 }
+
 vertex tint_symbol_outputs tint_symbol() {
   return tint_symbol_outputs{.tint_symbol_1=tint_symbol_inner()};
 }
-program_source:4:36: error: expected ';' at end of declaration list
+program_source:5:36: error: expected ';' at end of declaration list
   float4 tint_symbol_1 [[position]] TINT_INVARIANT;
                                    ^
                                    ;
diff --git a/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl
index 4189aec..e7922f6 100644
--- a/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl
+++ b/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl
@@ -2,15 +2,24 @@
 
 #include <metal_stdlib>
 using namespace metal;
+
 struct Out {
-  float4 pos [[position]] TINT_INVARIANT;
+  float4 pos;
 };
 
-vertex Out tint_symbol() {
+struct tint_symbol_outputs {
+  float4 Out_pos [[position]] TINT_INVARIANT;
+};
+
+Out tint_symbol_inner() {
   return Out{};
 }
-program_source:4:26: error: expected ';' at end of declaration list
-  float4 pos [[position]] TINT_INVARIANT;
-                         ^
-                         ;
+
+vertex tint_symbol_outputs tint_symbol() {
+  return tint_symbol_outputs{.Out_pos=tint_symbol_inner().pos};
+}
+program_source:9:30: error: expected ';' at end of declaration list
+  float4 Out_pos [[position]] TINT_INVARIANT;
+                             ^
+                             ;
 
diff --git a/test/tint/var/uses/push_constant.wgsl.expected.ir.msl b/test/tint/var/uses/push_constant.wgsl.expected.ir.msl
index 1d684b4..9574d10c 100644
--- a/test/tint/var/uses/push_constant.wgsl.expected.ir.msl
+++ b/test/tint/var/uses/push_constant.wgsl.expected.ir.msl
@@ -1,56 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %a:ptr<push_constant, i32, read_write> = var
-  %b:ptr<push_constant, i32, read_write> = var
-  %c:ptr<push_constant, i32, read_write> = var
-}
-
-%uses_a = func():void {
-  $B2: {
-    %5:i32 = load %a
-    %foo:i32 = let %5
-    ret
-  }
-}
-%uses_uses_a = func():void {
-  $B3: {
-    %8:void = call %uses_a
-    ret
-  }
-}
-%uses_b = func():void {
-  $B4: {
-    %10:i32 = load %b
-    %foo_1:i32 = let %10  # %foo_1: 'foo'
-    ret
-  }
-}
-%main1 = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %uses_a
-    ret
-  }
-}
-%main2 = @compute @workgroup_size(1, 1, 1) func():void {
-  $B6: {
-    %15:void = call %uses_uses_a
-    ret
-  }
-}
-%main3 = @compute @workgroup_size(1, 1, 1) func():void {
-  $B7: {
-    %17:void = call %uses_b
-    ret
-  }
-}
-%main4 = @compute @workgroup_size(1, 1, 1) func():void {
-  $B8: {
-    ret
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: push_constant
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *
diff --git a/test/tint/var/uses/push_constant_and_instance_index.wgsl.expected.ir.msl b/test/tint/var/uses/push_constant_and_instance_index.wgsl.expected.ir.msl
index 9d5b08e..9574d10c 100644
--- a/test/tint/var/uses/push_constant_and_instance_index.wgsl.expected.ir.msl
+++ b/test/tint/var/uses/push_constant_and_instance_index.wgsl.expected.ir.msl
@@ -1,21 +1,6 @@
 SKIP: FAILED
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %a:ptr<push_constant, f32, read_write> = var
-}
-
-%tint_symbol = @vertex func(%b:u32 [@instance_index]):vec4<f32> [@position] {
-  $B2: {
-    %4:f32 = load %a
-    %5:f32 = let %4
-    %6:f32 = convert %b
-    %7:f32 = add %5, %6
-    %8:vec4<f32> = construct %7
-    ret %8
-  }
-}
-
-unhandled variable address space
+../../src/tint/lang/msl/writer/raise/module_scope_vars.cc:239 internal compiler error: TINT_UNREACHABLE unhandled address space: push_constant
 ********************************************************************
 *  The tint shader compiler has encountered an unexpected error.   *
 *                                                                  *