msl: Automatically remap binding numbers in exe

Remap all resources into a flat namespace, to allow tests to pass when
multiple resources use the same binding number.

Fixed: tint:959
Change-Id: I58ed07c789e1ea90fc370ceba73b9d8292902549
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/61261
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/samples/main.cc b/samples/main.cc
index 61099c1..ad6104a 100644
--- a/samples/main.cc
+++ b/samples/main.cc
@@ -686,10 +686,71 @@
 /// @returns true on success
 bool GenerateMsl(const tint::Program* program, const Options& options) {
 #if TINT_BUILD_MSL_WRITER
+  const tint::Program* input_program = program;
+
+  // Remap resource numbers to a flat namespace.
+  // TODO(crbug.com/tint/1101): Make this more robust for multiple entry points.
+  using BindingPoint = tint::transform::BindingPoint;
+  tint::transform::BindingRemapper::BindingPoints binding_points;
+  uint32_t next_buffer_idx = 0;
+  uint32_t next_sampler_idx = 0;
+  uint32_t next_texture_idx = 0;
+
+  tint::inspector::Inspector inspector(program);
+  auto entry_points = inspector.GetEntryPoints();
+  for (auto& entry_point : entry_points) {
+    auto bindings = inspector.GetResourceBindings(entry_point.name);
+    for (auto& binding : bindings) {
+      BindingPoint src = {binding.bind_group, binding.binding};
+      if (binding_points.count(src)) {
+        continue;
+      }
+      switch (binding.resource_type) {
+        case tint::inspector::ResourceBinding::ResourceType::kUniformBuffer:
+        case tint::inspector::ResourceBinding::ResourceType::kStorageBuffer:
+        case tint::inspector::ResourceBinding::ResourceType::
+            kReadOnlyStorageBuffer:
+          binding_points.emplace(src, BindingPoint{0, next_buffer_idx++});
+          break;
+        case tint::inspector::ResourceBinding::ResourceType::kSampler:
+        case tint::inspector::ResourceBinding::ResourceType::kComparisonSampler:
+          binding_points.emplace(src, BindingPoint{0, next_sampler_idx++});
+          break;
+        case tint::inspector::ResourceBinding::ResourceType::kSampledTexture:
+        case tint::inspector::ResourceBinding::ResourceType::
+            kMultisampledTexture:
+        case tint::inspector::ResourceBinding::ResourceType::
+            kReadOnlyStorageTexture:
+        case tint::inspector::ResourceBinding::ResourceType::
+            kWriteOnlyStorageTexture:
+        case tint::inspector::ResourceBinding::ResourceType::kDepthTexture:
+        case tint::inspector::ResourceBinding::ResourceType::
+            kDepthMultisampledTexture:
+        case tint::inspector::ResourceBinding::ResourceType::kExternalTexture:
+          binding_points.emplace(src, BindingPoint{0, next_texture_idx++});
+          break;
+      }
+    }
+  }
+
+  // Run the binding remapper transform.
+  tint::transform::Output transform_output;
+  if (!binding_points.empty()) {
+    tint::transform::Manager manager;
+    tint::transform::DataMap inputs;
+    inputs.Add<tint::transform::BindingRemapper::Remappings>(
+        std::move(binding_points),
+        tint::transform::BindingRemapper::AccessControls{},
+        /* mayCollide */ true);
+    manager.Add<tint::transform::BindingRemapper>();
+    transform_output = manager.Run(program, inputs);
+    input_program = &transform_output.program;
+  }
+
   // TODO(jrprice): Provide a way for the user to set non-default options.
   tint::writer::msl::Options gen_options;
   gen_options.disable_workgroup_init = options.disable_workgroup_init;
-  auto result = tint::writer::msl::Generate(program, gen_options);
+  auto result = tint::writer::msl::Generate(input_program, gen_options);
   if (!result.success) {
     PrintWGSL(std::cerr, *program);
     std::cerr << "Failed to generate: " << result.error << std::endl;
diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc
index 57ff8b3..e2c103c 100644
--- a/src/writer/msl/generator_impl.cc
+++ b/src/writer/msl/generator_impl.cc
@@ -1599,17 +1599,22 @@
       if (type->Is<sem::Struct>()) {
         out << " [[stage_in]]";
       } else if (var->type()->is_handle()) {
-        auto* binding =
-            ast::GetDecoration<ast::BindingDecoration>(var->decorations());
-        if (binding == nullptr) {
+        auto bp = var->binding_point();
+        if (bp.group == nullptr || bp.binding == nullptr) {
           TINT_ICE(Writer, diagnostics_)
-              << "missing binding attribute for entry point parameter";
+              << "missing binding attributes for entry point parameter";
+          return false;
+        }
+        if (bp.group->value() != 0) {
+          TINT_ICE(Writer, diagnostics_)
+              << "encountered non-zero resource group index (use "
+                 "BindingRemapper to fix)";
           return false;
         }
         if (var->type()->Is<ast::Sampler>()) {
-          out << " [[sampler(" << binding->value() << ")]]";
+          out << " [[sampler(" << bp.binding->value() << ")]]";
         } else if (var->type()->Is<ast::Texture>()) {
-          out << " [[texture(" << binding->value() << ")]]";
+          out << " [[texture(" << bp.binding->value() << ")]]";
         } else {
           TINT_ICE(Writer, diagnostics_)
               << "invalid handle type entry point parameter";
diff --git a/test/bug/dawn/947.wgsl.expected.msl b/test/bug/dawn/947.wgsl.expected.msl
index 4003d16..4bd7fd4 100644
--- a/test/bug/dawn/947.wgsl.expected.msl
+++ b/test/bug/dawn/947.wgsl.expected.msl
@@ -53,7 +53,7 @@
   return srcColor;
 }
 
-fragment tint_symbol_3 fs_main(texture2d<float, access::sample> tint_symbol_6 [[texture(2)]], sampler tint_symbol_7 [[sampler(1)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+fragment tint_symbol_3 fs_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
   float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, tint_symbol_6, tint_symbol_7);
   tint_symbol_3 wrapper_result_1 = {};
   wrapper_result_1.value = inner_result_1;
diff --git a/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.msl b/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.msl
index 7bf987a..d8fa218 100644
--- a/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.msl
+++ b/test/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.msl
@@ -14,7 +14,7 @@
   /* 0x0000 */ tint_array_wrapper data;
 };
 
-kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(2)]], device SSBO& ssbo [[buffer(1)]]) {
+kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]], device SSBO& ssbo [[buffer(2)]]) {
   result.out = ssbo.data.arr[ubo.dynamic_idx];
   return;
 }
diff --git a/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.msl b/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.msl
index 3466444..baac41e 100644
--- a/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.msl
+++ b/test/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.msl
@@ -16,7 +16,7 @@
   /* 0x0000 */ int out;
 };
 
-kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(2)]]) {
+kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
   result.out = ubo.data.arr[ubo.dynamic_idx].el;
   return;
 }
diff --git a/test/bug/tint/1046.wgsl.expected.msl b/test/bug/tint/1046.wgsl.expected.msl
index 77d314a..6081ab0 100644
--- a/test/bug/tint/1046.wgsl.expected.msl
+++ b/test/bug/tint/1046.wgsl.expected.msl
@@ -66,7 +66,7 @@
   return output;
 }
 
-fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_11 [[texture(3)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) {
+fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(0)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]], constant Uniforms& uniforms [[buffer(0)]], const device PointLights& pointLights [[buffer(1)]]) {
   FragmentInput const tint_symbol_5 = {.position=position, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color};
   FragmentOutput const inner_result = tint_symbol_1_inner(uniforms, pointLights, tint_symbol_5, tint_symbol_10, tint_symbol_11);
   tint_symbol_4 wrapper_result = {};
diff --git a/test/bug/tint/1088.spvasm.expected.msl b/test/bug/tint/1088.spvasm.expected.msl
index 1c1ef4a..6010645 100644
--- a/test/bug/tint/1088.spvasm.expected.msl
+++ b/test/bug/tint/1088.spvasm.expected.msl
@@ -66,7 +66,7 @@
   return tint_symbol_4;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_14 [[buffer(2)]]) {
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_14 [[buffer(0)]]) {
   thread float3 tint_symbol_14 = 0.0f;
   thread float2 tint_symbol_15 = 0.0f;
   thread float3 tint_symbol_16 = 0.0f;
diff --git a/test/bug/tint/1113.wgsl.expected.msl b/test/bug/tint/1113.wgsl.expected.msl
index 2cfcdc0..1eaadd3 100644
--- a/test/bug/tint/1113.wgsl.expected.msl
+++ b/test/bug/tint/1113.wgsl.expected.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
 #include <metal_stdlib>
 
 using namespace metal;
@@ -105,7 +103,7 @@
   }
 }
 
-kernel void main_count(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(50)]], device AU32s& counters [[buffer(20)]], device U32s& indices [[buffer(10)]], device F32s& positions [[buffer(11)]], device AI32s& LUT [[buffer(21)]]) {
+kernel void main_count(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(1)]], device AU32s& counters [[buffer(2)]], device U32s& indices [[buffer(3)]], device F32s& positions [[buffer(4)]], device AI32s& LUT [[buffer(5)]]) {
   main_count_inner(uniforms, dbg, counters, indices, positions, LUT, GlobalInvocationID);
   return;
 }
@@ -125,7 +123,7 @@
   atomic_store_explicit(&(LUT.values[voxelIndex]), offset, memory_order_relaxed);
 }
 
-kernel void main_create_lut(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(50)]], device AU32s& counters [[buffer(20)]], device U32s& indices [[buffer(10)]], device F32s& positions [[buffer(11)]], device AI32s& LUT [[buffer(21)]]) {
+kernel void main_create_lut(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(1)]], device AU32s& counters [[buffer(2)]], device U32s& indices [[buffer(3)]], device F32s& positions [[buffer(4)]], device AI32s& LUT [[buffer(5)]]) {
   main_create_lut_inner(uniforms, dbg, counters, indices, positions, LUT, GlobalInvocationID);
   return;
 }
@@ -148,54 +146,8 @@
   int triangleOffset = atomic_fetch_add_explicit(&(LUT.values[voxelIndex]), 1, memory_order_relaxed);
 }
 
-kernel void main_sort_triangles(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(50)]], device AU32s& counters [[buffer(20)]], device U32s& indices [[buffer(10)]], device F32s& positions [[buffer(11)]], device AI32s& LUT [[buffer(21)]]) {
+kernel void main_sort_triangles(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(1)]], device AU32s& counters [[buffer(2)]], device U32s& indices [[buffer(3)]], device F32s& positions [[buffer(4)]], device AI32s& LUT [[buffer(5)]]) {
   main_sort_triangles_inner(uniforms, dbg, counters, indices, positions, LUT, GlobalInvocationID);
   return;
 }
 
-Compilation failed: 
-
-program_source:75:8: warning: unused variable 'kj6'
-  uint kj6 = dbg.value1;
-       ^
-program_source:78:9: warning: unused variable 'rb5'
-  float rb5 = positions.values[0];
-        ^
-program_source:79:7: warning: unused variable 'g55'
-  int g55 = atomic_load_explicit(&(LUT.values[0]), memory_order_relaxed);
-      ^
-program_source:77:8: warning: unused variable 'rwg'
-  uint rwg = indices.values[0];
-       ^
-program_source:74:8: warning: unused variable 'g42'
-  uint g42 = uniforms.numTriangles;
-       ^
-program_source:76:8: warning: unused variable 'b53'
-  uint b53 = atomic_load_explicit(&(counters.values[0]), memory_order_relaxed);
-       ^
-program_source:98:22: warning: equality comparison with extraneous parentheses
-  if ((triangleIndex == 0u)) {
-       ~~~~~~~~~~~~~~^~~~~
-program_source:98:22: note: remove extraneous parentheses around the comparison to silence this warning
-  if ((triangleIndex == 0u)) {
-      ~              ^    ~
-program_source:98:22: note: use '=' to turn this equality comparison into an assignment
-  if ((triangleIndex == 0u)) {
-                     ^~
-                     =
-program_source:97:8: warning: unused variable 'acefg'
-  uint acefg = atomic_fetch_add_explicit(&(counters.values[voxelIndex]), 1u, memory_order_relaxed);
-       ^
-program_source:106:146: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
-kernel void main_count(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(50)]], device AU32s& counters [[buffer(20)]], device U32s& indices [[buffer(10)]], device F32s& positions [[buffer(11)]], device AI32s& LUT [[buffer(21)]]) {
-                                                                                                                                                 ^
-program_source:126:151: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
-kernel void main_create_lut(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(50)]], device AU32s& counters [[buffer(20)]], device U32s& indices [[buffer(10)]], device F32s& positions [[buffer(11)]], device AI32s& LUT [[buffer(21)]]) {
-                                                                                                                                                      ^
-program_source:146:7: warning: unused variable 'triangleOffset'
-  int triangleOffset = atomic_fetch_add_explicit(&(LUT.values[voxelIndex]), 1, memory_order_relaxed);
-      ^
-program_source:149:155: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
-kernel void main_sort_triangles(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(50)]], device AU32s& counters [[buffer(20)]], device U32s& indices [[buffer(10)]], device F32s& positions [[buffer(11)]], device AI32s& LUT [[buffer(21)]]) {
-                                                                                                                                                          ^
-
diff --git a/test/bug/tint/403.wgsl.expected.msl b/test/bug/tint/403.wgsl.expected.msl
index 82ac99b..9f88b26 100644
--- a/test/bug/tint/403.wgsl.expected.msl
+++ b/test/bug/tint/403.wgsl.expected.msl
@@ -1,19 +1,35 @@
-SKIP: FAILED
+#include <metal_stdlib>
 
+using namespace metal;
+struct vertexUniformBuffer1 {
+  /* 0x0000 */ float2x2 transform1;
+};
+struct vertexUniformBuffer2 {
+  /* 0x0000 */ float2x2 transform2;
+};
+struct tint_symbol_1 {
+  float4 value [[position]];
+};
+struct tint_array_wrapper {
+  float2 arr[3];
+};
 
+float4 tint_symbol_inner(constant vertexUniformBuffer1& x_20, constant vertexUniformBuffer2& x_26, uint gl_VertexIndex) {
+  tint_array_wrapper indexable = {};
+  float2x2 const x_23 = x_20.transform1;
+  float2x2 const x_28 = x_26.transform2;
+  uint const x_46 = gl_VertexIndex;
+  tint_array_wrapper const tint_symbol_2 = {.arr={float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(-1.0f, -1.0f)}};
+  indexable = tint_symbol_2;
+  float2 const x_51 = indexable.arr[x_46];
+  float2 const x_52 = (float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])) * x_51);
+  return float4(x_52.x, x_52.y, 0.0f, 1.0f);
+}
 
-Validation Failure:
+vertex tint_symbol_1 tint_symbol(uint gl_VertexIndex [[vertex_id]], constant vertexUniformBuffer1& x_20 [[buffer(0)]], constant vertexUniformBuffer2& x_26 [[buffer(1)]]) {
+  float4 const inner_result = tint_symbol_inner(x_20, x_26, gl_VertexIndex);
+  tint_symbol_1 wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
 
-Compilation failed: 
-
-program_source:17:55: error: type 'int' is not valid for attribute 'vertex_id'
-vertex tint_symbol_2 tint_symbol(int gl_VertexIndex [[vertex_id]], constant vertexUniformBuffer1& x_20 [[buffer(0)]], constant vertexUniformBuffer2& x_26 [[buffer(0)]]) {
-                                                      ^~~~~~~~~
-program_source:18:37: warning: suggest braces around initialization of subobject
-  tint_array_wrapper_0 indexable = {0.0f};
-                                    ^~~~
-                                    {   }
-program_source:22:47: warning: suggest braces around initialization of subobject
-  tint_array_wrapper_0 const tint_symbol_3 = {float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(-1.0f, -1.0f)};
-                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-                                              {                                                            }
diff --git a/test/bug/tint/534.wgsl.expected.msl b/test/bug/tint/534.wgsl.expected.msl
index 9cdcaee..e294678 100644
--- a/test/bug/tint/534.wgsl.expected.msl
+++ b/test/bug/tint/534.wgsl.expected.msl
@@ -39,7 +39,7 @@
   }
 }
 
-kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) {
+kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device OutputBuf& output [[buffer(1)]]) {
   tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/bug/tint/744.wgsl.expected.msl b/test/bug/tint/744.wgsl.expected.msl
index d7964c7..4c313e6 100644
--- a/test/bug/tint/744.wgsl.expected.msl
+++ b/test/bug/tint/744.wgsl.expected.msl
@@ -24,7 +24,7 @@
   resultMatrix.numbers[index] = result;
 }
 
-kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) {
+kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], const device Matrix& firstMatrix [[buffer(2)]], const device Matrix& secondMatrix [[buffer(3)]], device Matrix& resultMatrix [[buffer(1)]]) {
   tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, global_id);
   return;
 }
diff --git a/test/bug/tint/757.wgsl.expected.msl b/test/bug/tint/757.wgsl.expected.msl
index fe24d96..c40c608 100644
--- a/test/bug/tint/757.wgsl.expected.msl
+++ b/test/bug/tint/757.wgsl.expected.msl
@@ -17,7 +17,7 @@
   }
 }
 
-kernel void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(3)]]) {
+kernel void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(0)]]) {
   tint_symbol_inner(result, GlobalInvocationID, tint_symbol_2);
   return;
 }
diff --git a/test/bug/tint/827.wgsl.expected.msl b/test/bug/tint/827.wgsl.expected.msl
index c6d933a..f9eea7a 100644
--- a/test/bug/tint/827.wgsl.expected.msl
+++ b/test/bug/tint/827.wgsl.expected.msl
@@ -10,7 +10,7 @@
   result.values[((GlobalInvocationId.y * width) + GlobalInvocationId.x)] = tint_symbol_1.read(uint2(int2(int(GlobalInvocationId.x), int(GlobalInvocationId.y))), 0);
 }
 
-kernel void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]], device Result& result [[buffer(1)]]) {
+kernel void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]], device Result& result [[buffer(0)]]) {
   tint_symbol_inner(result, GlobalInvocationId, tint_symbol_2);
   return;
 }
diff --git a/test/bug/tint/870.spvasm.expected.msl b/test/bug/tint/870.spvasm.expected.msl
index b97dede..4ad7d1c 100644
--- a/test/bug/tint/870.spvasm.expected.msl
+++ b/test/bug/tint/870.spvasm.expected.msl
@@ -26,7 +26,7 @@
   return;
 }
 
-fragment void tint_symbol(const device x_B4_BuildInformation& sspp962805860buildInformation [[buffer(2)]]) {
+fragment void tint_symbol(const device x_B4_BuildInformation& sspp962805860buildInformation [[buffer(0)]]) {
   main_1(sspp962805860buildInformation);
   return;
 }
diff --git a/test/bug/tint/913.wgsl.expected.msl b/test/bug/tint/913.wgsl.expected.msl
index 17237e0..88ae3d1 100644
--- a/test/bug/tint/913.wgsl.expected.msl
+++ b/test/bug/tint/913.wgsl.expected.msl
@@ -45,7 +45,7 @@
   }
 }
 
-kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(3)]], device OutputBuf& output [[buffer(2)]]) {
+kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device OutputBuf& output [[buffer(1)]]) {
   tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/bug/tint/914.wgsl.expected.msl b/test/bug/tint/914.wgsl.expected.msl
index eb146a2..426f200 100644
--- a/test/bug/tint/914.wgsl.expected.msl
+++ b/test/bug/tint/914.wgsl.expected.msl
@@ -111,7 +111,7 @@
   }
 }
 
-kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(3)]], const device Matrix& firstMatrix [[buffer(0)]], const device Matrix& secondMatrix [[buffer(1)]], device Matrix& resultMatrix [[buffer(2)]]) {
+kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(0)]], const device Matrix& firstMatrix [[buffer(2)]], const device Matrix& secondMatrix [[buffer(3)]], device Matrix& resultMatrix [[buffer(1)]]) {
   threadgroup tint_array_wrapper tint_symbol_3;
   threadgroup tint_array_wrapper tint_symbol_4;
   tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, local_id, global_id, local_invocation_index, &(tint_symbol_3), &(tint_symbol_4));
diff --git a/test/bug/tint/922.wgsl.expected.msl b/test/bug/tint/922.wgsl.expected.msl
index dcb3e5b..a5f87bb 100644
--- a/test/bug/tint/922.wgsl.expected.msl
+++ b/test/bug/tint/922.wgsl.expected.msl
@@ -283,7 +283,7 @@
   return tint_symbol_4;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(2)]], constant ub_SceneParams& global [[buffer(0)]], constant ub_MaterialParams& global1 [[buffer(1)]]) {
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(0)]], constant ub_SceneParams& global [[buffer(1)]], constant ub_MaterialParams& global1 [[buffer(2)]]) {
   thread float3 tint_symbol_21 = 0.0f;
   thread float2 tint_symbol_22 = 0.0f;
   thread float4 tint_symbol_23 = 0.0f;
diff --git a/test/bug/tint/926.wgsl.expected.msl b/test/bug/tint/926.wgsl.expected.msl
index 0c15829..b433b57 100644
--- a/test/bug/tint/926.wgsl.expected.msl
+++ b/test/bug/tint/926.wgsl.expected.msl
@@ -9,7 +9,7 @@
   uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), *(tint_symbol), memory_order_relaxed);
 }
 
-kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(5)]]) {
+kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(0)]]) {
   thread uint tint_symbol_1 = 0u;
   computeMain_inner(drawOut, global_id, &(tint_symbol_1));
   return;
diff --git a/test/bug/tint/942.wgsl.expected.msl b/test/bug/tint/942.wgsl.expected.msl
index ad93bb5..935fd20 100644
--- a/test/bug/tint/942.wgsl.expected.msl
+++ b/test/bug/tint/942.wgsl.expected.msl
@@ -54,7 +54,7 @@
   }
 }
 
-kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_6 [[texture(1)]], sampler tint_symbol_7 [[sampler(0)]], texture2d<float, access::write> tint_symbol_8 [[texture(2)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(1)]], constant Flip& flip [[buffer(3)]]) {
+kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(0)]], texture2d<float, access::write> tint_symbol_8 [[texture(1)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(0)]], constant Flip& flip [[buffer(1)]]) {
   threadgroup tint_array_wrapper tint_symbol_5;
   tint_symbol_inner(params, flip, WorkGroupID, LocalInvocationID, local_invocation_index, &(tint_symbol_5), tint_symbol_6, tint_symbol_7, tint_symbol_8);
   return;
diff --git a/test/bug/tint/943.spvasm.expected.msl b/test/bug/tint/943.spvasm.expected.msl
index 9ce264b..fc91858 100644
--- a/test/bug/tint/943.spvasm.expected.msl
+++ b/test/bug/tint/943.spvasm.expected.msl
@@ -499,7 +499,7 @@
   main_1(x_48, x_165, x_185, x_54, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_28, tint_symbol_32, tint_symbol_27, tint_symbol_26, tint_symbol_25);
 }
 
-kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(3)]], const device ssbA& x_165 [[buffer(1)]], const device ssbB& x_185 [[buffer(2)]], device ssbOut& x_54 [[buffer(0)]]) {
+kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(0)]], const device ssbA& x_165 [[buffer(2)]], const device ssbB& x_185 [[buffer(3)]], device ssbOut& x_54 [[buffer(1)]]) {
   threadgroup tint_array_wrapper_2 tint_symbol_33;
   threadgroup tint_array_wrapper tint_symbol_34;
   thread uint3 tint_symbol_35 = 0u;
diff --git a/test/bug/tint/948.wgsl.expected.msl b/test/bug/tint/948.wgsl.expected.msl
index a1007e0..b04507a 100644
--- a/test/bug/tint/948.wgsl.expected.msl
+++ b/test/bug/tint/948.wgsl.expected.msl
@@ -205,7 +205,7 @@
   return tint_symbol_4;
 }
 
-fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_42 [[texture(6)]], sampler tint_symbol_43 [[sampler(4)]], texture2d<float, access::sample> tint_symbol_44 [[texture(5)]], texture2d<float, access::sample> tint_symbol_45 [[texture(8)]], sampler tint_symbol_46 [[sampler(7)]], texture2d<float, access::sample> tint_symbol_48 [[texture(3)]], sampler tint_symbol_49 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_50 [[texture(1)]], sampler tint_symbol_51 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(9)]]) {
+fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_42 [[texture(0)]], sampler tint_symbol_43 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_44 [[texture(1)]], texture2d<float, access::sample> tint_symbol_45 [[texture(2)]], sampler tint_symbol_46 [[sampler(1)]], texture2d<float, access::sample> tint_symbol_48 [[texture(3)]], sampler tint_symbol_49 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_50 [[texture(4)]], sampler tint_symbol_51 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(0)]]) {
   thread float2 tint_symbol_36 = 0.0f;
   thread float2 tint_symbol_37 = 0.0f;
   thread float2 tint_symbol_38 = 0.0f;
diff --git a/test/bug/tint/949.wgsl.expected.msl b/test/bug/tint/949.wgsl.expected.msl
index 9f56606..1b38e14 100644
--- a/test/bug/tint/949.wgsl.expected.msl
+++ b/test/bug/tint/949.wgsl.expected.msl
@@ -425,7 +425,7 @@
   return tint_symbol_4;
 }
 
-fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_36 [[texture(1)]], sampler tint_symbol_37 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_38 [[texture(3)]], sampler tint_symbol_39 [[sampler(2)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(6)]], constant Light0& light0 [[buffer(5)]]) {
+fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_36 [[texture(0)]], sampler tint_symbol_37 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_38 [[texture(1)]], sampler tint_symbol_39 [[sampler(1)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(0)]], constant Light0& light0 [[buffer(1)]]) {
   thread float2 tint_symbol_29 = 0.0f;
   thread float4 tint_symbol_30 = 0.0f;
   thread bool tint_symbol_31 = false;
diff --git a/test/bug/tint/951.spvasm.expected.msl b/test/bug/tint/951.spvasm.expected.msl
index 3d877fa..b8d78da 100644
--- a/test/bug/tint/951.spvasm.expected.msl
+++ b/test/bug/tint/951.spvasm.expected.msl
@@ -66,7 +66,7 @@
   main_1(x_24, x_20, x_16, tint_symbol_4);
 }
 
-kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant Uniforms& x_24 [[buffer(2)]], const device ssbA& x_20 [[buffer(1)]], device ssbOut& x_16 [[buffer(0)]]) {
+kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant Uniforms& x_24 [[buffer(0)]], const device ssbA& x_20 [[buffer(2)]], device ssbOut& x_16 [[buffer(1)]]) {
   thread uint3 tint_symbol_5 = 0u;
   tint_symbol_1_inner(x_24, x_20, x_16, gl_GlobalInvocationID_param, &(tint_symbol_5));
   return;
diff --git a/test/bug/tint/959.wgsl b/test/bug/tint/959.wgsl
new file mode 100644
index 0000000..8059799
--- /dev/null
+++ b/test/bug/tint/959.wgsl
@@ -0,0 +1,114 @@
+// crbug.com/tint/959
+// Test that we automatically remap resource numbers into a flat namespace for
+// MSL. Use some high binding numbers to also test that the remapped numbers are
+// densely packed starting at 0.
+
+[[block]]
+struct S {
+  a : f32;
+};
+
+[[group(0),  binding(0)]] var<storage> b0  : S;
+[[group(1),  binding(0)]] var<storage> b1  : S;
+[[group(2),  binding(0)]] var<storage> b2  : S;
+[[group(3),  binding(0)]] var<storage> b3  : S;
+[[group(4),  binding(0)]] var<storage> b4  : S;
+[[group(5),  binding(0)]] var<storage> b5  : S;
+[[group(6),  binding(0)]] var<storage> b6  : S;
+[[group(7),  binding(0)]] var<storage> b7  : S;
+[[group(9),  binding(1)]] var<uniform> b8  : S;
+[[group(8),  binding(1)]] var<uniform> b9  : S;
+[[group(10), binding(1)]] var<uniform> b10 : S;
+[[group(11), binding(1)]] var<uniform> b11 : S;
+[[group(12), binding(1)]] var<uniform> b12 : S;
+[[group(13), binding(1)]] var<uniform> b13 : S;
+[[group(14), binding(1)]] var<uniform> b14 : S;
+[[group(15), binding(1)]] var<uniform> b15 : S;
+
+[[group(0),  binding(1)]] var t0  : texture_2d<f32>;
+[[group(1),  binding(1)]] var t1  : texture_2d<f32>;
+[[group(2),  binding(1)]] var t2  : texture_2d<f32>;
+[[group(3),  binding(1)]] var t3  : texture_2d<f32>;
+[[group(4),  binding(1)]] var t4  : texture_2d<f32>;
+[[group(5),  binding(1)]] var t5  : texture_2d<f32>;
+[[group(6),  binding(1)]] var t6  : texture_2d<f32>;
+[[group(7),  binding(1)]] var t7  : texture_2d<f32>;
+[[group(8),  binding(200)]] var t8  : texture_depth_2d;
+[[group(9),  binding(200)]] var t9  : texture_depth_2d;
+[[group(10), binding(200)]] var t10 : texture_depth_2d;
+[[group(11), binding(200)]] var t11 : texture_depth_2d;
+[[group(12), binding(200)]] var t12 : texture_depth_2d;
+[[group(13), binding(200)]] var t13 : texture_depth_2d;
+[[group(14), binding(200)]] var t14 : texture_depth_2d;
+[[group(15), binding(200)]] var t15 : texture_depth_2d;
+
+[[group(0),  binding(200)]] var s0 : sampler;
+[[group(1),  binding(200)]] var s1 : sampler;
+[[group(2),  binding(200)]] var s2 : sampler;
+[[group(3),  binding(200)]] var s3 : sampler;
+[[group(4),  binding(200)]] var s4 : sampler;
+[[group(5),  binding(200)]] var s5 : sampler;
+[[group(6),  binding(200)]] var s6 : sampler;
+[[group(7),  binding(200)]] var s7 : sampler;
+[[group(8),  binding(300)]] var s8 : sampler_comparison;
+[[group(9),  binding(300)]] var s9 : sampler_comparison;
+[[group(10), binding(300)]] var s10 : sampler_comparison;
+[[group(11), binding(300)]] var s11 : sampler_comparison;
+[[group(12), binding(300)]] var s12 : sampler_comparison;
+[[group(13), binding(300)]] var s13 : sampler_comparison;
+[[group(14), binding(300)]] var s14 : sampler_comparison;
+[[group(15), binding(300)]] var s15 : sampler_comparison;
+
+[[stage(fragment)]]
+fn main() {
+  ignore(b0);
+  ignore(b1);
+  ignore(b2);
+  ignore(b3);
+  ignore(b4);
+  ignore(b5);
+  ignore(b6);
+  ignore(b7);
+  ignore(b8);
+  ignore(b9);
+  ignore(b10);
+  ignore(b11);
+  ignore(b12);
+  ignore(b13);
+  ignore(b14);
+  ignore(b15);
+
+  ignore(t0);
+  ignore(t1);
+  ignore(t2);
+  ignore(t3);
+  ignore(t4);
+  ignore(t5);
+  ignore(t6);
+  ignore(t7);
+  ignore(t8);
+  ignore(t9);
+  ignore(t10);
+  ignore(t11);
+  ignore(t12);
+  ignore(t13);
+  ignore(t14);
+  ignore(t15);
+
+  ignore(s0);
+  ignore(s1);
+  ignore(s2);
+  ignore(s3);
+  ignore(s4);
+  ignore(s5);
+  ignore(s6);
+  ignore(s7);
+  ignore(s8);
+  ignore(s9);
+  ignore(s10);
+  ignore(s11);
+  ignore(s12);
+  ignore(s13);
+  ignore(s14);
+  ignore(s15);
+}
diff --git a/test/bug/tint/959.wgsl.expected.hlsl b/test/bug/tint/959.wgsl.expected.hlsl
new file mode 100644
index 0000000..f6ff094
--- /dev/null
+++ b/test/bug/tint/959.wgsl.expected.hlsl
@@ -0,0 +1,116 @@
+ByteAddressBuffer b0 : register(t0, space0);
+ByteAddressBuffer b1 : register(t0, space1);
+ByteAddressBuffer b2 : register(t0, space2);
+ByteAddressBuffer b3 : register(t0, space3);
+ByteAddressBuffer b4 : register(t0, space4);
+ByteAddressBuffer b5 : register(t0, space5);
+ByteAddressBuffer b6 : register(t0, space6);
+ByteAddressBuffer b7 : register(t0, space7);
+cbuffer cbuffer_b8 : register(b1, space9) {
+  uint4 b8[1];
+};
+cbuffer cbuffer_b9 : register(b1, space8) {
+  uint4 b9[1];
+};
+cbuffer cbuffer_b10 : register(b1, space10) {
+  uint4 b10[1];
+};
+cbuffer cbuffer_b11 : register(b1, space11) {
+  uint4 b11[1];
+};
+cbuffer cbuffer_b12 : register(b1, space12) {
+  uint4 b12[1];
+};
+cbuffer cbuffer_b13 : register(b1, space13) {
+  uint4 b13[1];
+};
+cbuffer cbuffer_b14 : register(b1, space14) {
+  uint4 b14[1];
+};
+cbuffer cbuffer_b15 : register(b1, space15) {
+  uint4 b15[1];
+};
+Texture2D<float4> t0 : register(t1, space0);
+Texture2D<float4> t1 : register(t1, space1);
+Texture2D<float4> t2 : register(t1, space2);
+Texture2D<float4> t3 : register(t1, space3);
+Texture2D<float4> t4 : register(t1, space4);
+Texture2D<float4> t5 : register(t1, space5);
+Texture2D<float4> t6 : register(t1, space6);
+Texture2D<float4> t7 : register(t1, space7);
+Texture2D t8 : register(t200, space8);
+Texture2D t9 : register(t200, space9);
+Texture2D t10 : register(t200, space10);
+Texture2D t11 : register(t200, space11);
+Texture2D t12 : register(t200, space12);
+Texture2D t13 : register(t200, space13);
+Texture2D t14 : register(t200, space14);
+Texture2D t15 : register(t200, space15);
+SamplerState s0 : register(s200, space0);
+SamplerState s1 : register(s200, space1);
+SamplerState s2 : register(s200, space2);
+SamplerState s3 : register(s200, space3);
+SamplerState s4 : register(s200, space4);
+SamplerState s5 : register(s200, space5);
+SamplerState s6 : register(s200, space6);
+SamplerState s7 : register(s200, space7);
+SamplerComparisonState s8 : register(s300, space8);
+SamplerComparisonState s9 : register(s300, space9);
+SamplerComparisonState s10 : register(s300, space10);
+SamplerComparisonState s11 : register(s300, space11);
+SamplerComparisonState s12 : register(s300, space12);
+SamplerComparisonState s13 : register(s300, space13);
+SamplerComparisonState s14 : register(s300, space14);
+SamplerComparisonState s15 : register(s300, space15);
+
+void main() {
+  b0;
+  b1;
+  b2;
+  b3;
+  b4;
+  b5;
+  b6;
+  b7;
+  b8;
+  b9;
+  b10;
+  b11;
+  b12;
+  b13;
+  b14;
+  b15;
+  t0;
+  t1;
+  t2;
+  t3;
+  t4;
+  t5;
+  t6;
+  t7;
+  t8;
+  t9;
+  t10;
+  t11;
+  t12;
+  t13;
+  t14;
+  t15;
+  s0;
+  s1;
+  s2;
+  s3;
+  s4;
+  s5;
+  s6;
+  s7;
+  s8;
+  s9;
+  s10;
+  s11;
+  s12;
+  s13;
+  s14;
+  s15;
+  return;
+}
diff --git a/test/bug/tint/959.wgsl.expected.msl b/test/bug/tint/959.wgsl.expected.msl
new file mode 100644
index 0000000..45a2da5
--- /dev/null
+++ b/test/bug/tint/959.wgsl.expected.msl
@@ -0,0 +1,59 @@
+#include <metal_stdlib>
+
+using namespace metal;
+struct S {
+  /* 0x0000 */ float a;
+};
+
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_1 [[texture(0)]], texture2d<float, access::sample> tint_symbol_2 [[texture(1)]], texture2d<float, access::sample> tint_symbol_3 [[texture(2)]], texture2d<float, access::sample> tint_symbol_4 [[texture(3)]], texture2d<float, access::sample> tint_symbol_5 [[texture(4)]], texture2d<float, access::sample> tint_symbol_6 [[texture(5)]], texture2d<float, access::sample> tint_symbol_7 [[texture(6)]], texture2d<float, access::sample> tint_symbol_8 [[texture(7)]], depth2d<float, access::sample> tint_symbol_9 [[texture(8)]], depth2d<float, access::sample> tint_symbol_10 [[texture(9)]], depth2d<float, access::sample> tint_symbol_11 [[texture(10)]], depth2d<float, access::sample> tint_symbol_12 [[texture(11)]], depth2d<float, access::sample> tint_symbol_13 [[texture(12)]], depth2d<float, access::sample> tint_symbol_14 [[texture(13)]], depth2d<float, access::sample> tint_symbol_15 [[texture(14)]], depth2d<float, access::sample> tint_symbol_16 [[texture(15)]], sampler tint_symbol_17 [[sampler(0)]], sampler tint_symbol_18 [[sampler(1)]], sampler tint_symbol_19 [[sampler(2)]], sampler tint_symbol_20 [[sampler(3)]], sampler tint_symbol_21 [[sampler(4)]], sampler tint_symbol_22 [[sampler(5)]], sampler tint_symbol_23 [[sampler(6)]], sampler tint_symbol_24 [[sampler(7)]], sampler tint_symbol_25 [[sampler(8)]], sampler tint_symbol_26 [[sampler(9)]], sampler tint_symbol_27 [[sampler(10)]], sampler tint_symbol_28 [[sampler(11)]], sampler tint_symbol_29 [[sampler(12)]], sampler tint_symbol_30 [[sampler(13)]], sampler tint_symbol_31 [[sampler(14)]], sampler tint_symbol_32 [[sampler(15)]], constant S& b8 [[buffer(0)]], constant S& b9 [[buffer(1)]], constant S& b10 [[buffer(2)]], constant S& b11 [[buffer(3)]], constant S& b12 [[buffer(4)]], constant S& b13 [[buffer(5)]], constant S& b14 [[buffer(6)]], constant S& b15 [[buffer(7)]], const device S& b0 [[buffer(8)]], const device S& b1 [[buffer(9)]], const device S& b2 [[buffer(10)]], const device S& b3 [[buffer(11)]], const device S& b4 [[buffer(12)]], const device S& b5 [[buffer(13)]], const device S& b6 [[buffer(14)]], const device S& b7 [[buffer(15)]]) {
+  (void) b0;
+  (void) b1;
+  (void) b2;
+  (void) b3;
+  (void) b4;
+  (void) b5;
+  (void) b6;
+  (void) b7;
+  (void) b8;
+  (void) b9;
+  (void) b10;
+  (void) b11;
+  (void) b12;
+  (void) b13;
+  (void) b14;
+  (void) b15;
+  (void) tint_symbol_1;
+  (void) tint_symbol_2;
+  (void) tint_symbol_3;
+  (void) tint_symbol_4;
+  (void) tint_symbol_5;
+  (void) tint_symbol_6;
+  (void) tint_symbol_7;
+  (void) tint_symbol_8;
+  (void) tint_symbol_9;
+  (void) tint_symbol_10;
+  (void) tint_symbol_11;
+  (void) tint_symbol_12;
+  (void) tint_symbol_13;
+  (void) tint_symbol_14;
+  (void) tint_symbol_15;
+  (void) tint_symbol_16;
+  (void) tint_symbol_17;
+  (void) tint_symbol_18;
+  (void) tint_symbol_19;
+  (void) tint_symbol_20;
+  (void) tint_symbol_21;
+  (void) tint_symbol_22;
+  (void) tint_symbol_23;
+  (void) tint_symbol_24;
+  (void) tint_symbol_25;
+  (void) tint_symbol_26;
+  (void) tint_symbol_27;
+  (void) tint_symbol_28;
+  (void) tint_symbol_29;
+  (void) tint_symbol_30;
+  (void) tint_symbol_31;
+  (void) tint_symbol_32;
+  return;
+}
+
diff --git a/test/bug/tint/959.wgsl.expected.spvasm b/test/bug/tint/959.wgsl.expected.spvasm
new file mode 100644
index 0000000..f47b352
--- /dev/null
+++ b/test/bug/tint/959.wgsl.expected.spvasm
@@ -0,0 +1,287 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 160
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main"
+               OpExecutionMode %main OriginUpperLeft
+               OpName %S "S"
+               OpMemberName %S 0 "a"
+               OpName %b0 "b0"
+               OpName %b1 "b1"
+               OpName %b2 "b2"
+               OpName %b3 "b3"
+               OpName %b4 "b4"
+               OpName %b5 "b5"
+               OpName %b6 "b6"
+               OpName %b7 "b7"
+               OpName %b8 "b8"
+               OpName %b9 "b9"
+               OpName %b10 "b10"
+               OpName %b11 "b11"
+               OpName %b12 "b12"
+               OpName %b13 "b13"
+               OpName %b14 "b14"
+               OpName %b15 "b15"
+               OpName %t0 "t0"
+               OpName %t1 "t1"
+               OpName %t2 "t2"
+               OpName %t3 "t3"
+               OpName %t4 "t4"
+               OpName %t5 "t5"
+               OpName %t6 "t6"
+               OpName %t7 "t7"
+               OpName %t8 "t8"
+               OpName %t9 "t9"
+               OpName %t10 "t10"
+               OpName %t11 "t11"
+               OpName %t12 "t12"
+               OpName %t13 "t13"
+               OpName %t14 "t14"
+               OpName %t15 "t15"
+               OpName %s0 "s0"
+               OpName %s1 "s1"
+               OpName %s2 "s2"
+               OpName %s3 "s3"
+               OpName %s4 "s4"
+               OpName %s5 "s5"
+               OpName %s6 "s6"
+               OpName %s7 "s7"
+               OpName %s8 "s8"
+               OpName %s9 "s9"
+               OpName %s10 "s10"
+               OpName %s11 "s11"
+               OpName %s12 "s12"
+               OpName %s13 "s13"
+               OpName %s14 "s14"
+               OpName %s15 "s15"
+               OpName %main "main"
+               OpDecorate %S Block
+               OpMemberDecorate %S 0 Offset 0
+               OpDecorate %b0 NonWritable
+               OpDecorate %b0 DescriptorSet 0
+               OpDecorate %b0 Binding 0
+               OpDecorate %b1 NonWritable
+               OpDecorate %b1 DescriptorSet 1
+               OpDecorate %b1 Binding 0
+               OpDecorate %b2 NonWritable
+               OpDecorate %b2 DescriptorSet 2
+               OpDecorate %b2 Binding 0
+               OpDecorate %b3 NonWritable
+               OpDecorate %b3 DescriptorSet 3
+               OpDecorate %b3 Binding 0
+               OpDecorate %b4 NonWritable
+               OpDecorate %b4 DescriptorSet 4
+               OpDecorate %b4 Binding 0
+               OpDecorate %b5 NonWritable
+               OpDecorate %b5 DescriptorSet 5
+               OpDecorate %b5 Binding 0
+               OpDecorate %b6 NonWritable
+               OpDecorate %b6 DescriptorSet 6
+               OpDecorate %b6 Binding 0
+               OpDecorate %b7 NonWritable
+               OpDecorate %b7 DescriptorSet 7
+               OpDecorate %b7 Binding 0
+               OpDecorate %b8 NonWritable
+               OpDecorate %b8 DescriptorSet 9
+               OpDecorate %b8 Binding 1
+               OpDecorate %b9 NonWritable
+               OpDecorate %b9 DescriptorSet 8
+               OpDecorate %b9 Binding 1
+               OpDecorate %b10 NonWritable
+               OpDecorate %b10 DescriptorSet 10
+               OpDecorate %b10 Binding 1
+               OpDecorate %b11 NonWritable
+               OpDecorate %b11 DescriptorSet 11
+               OpDecorate %b11 Binding 1
+               OpDecorate %b12 NonWritable
+               OpDecorate %b12 DescriptorSet 12
+               OpDecorate %b12 Binding 1
+               OpDecorate %b13 NonWritable
+               OpDecorate %b13 DescriptorSet 13
+               OpDecorate %b13 Binding 1
+               OpDecorate %b14 NonWritable
+               OpDecorate %b14 DescriptorSet 14
+               OpDecorate %b14 Binding 1
+               OpDecorate %b15 NonWritable
+               OpDecorate %b15 DescriptorSet 15
+               OpDecorate %b15 Binding 1
+               OpDecorate %t0 DescriptorSet 0
+               OpDecorate %t0 Binding 1
+               OpDecorate %t1 DescriptorSet 1
+               OpDecorate %t1 Binding 1
+               OpDecorate %t2 DescriptorSet 2
+               OpDecorate %t2 Binding 1
+               OpDecorate %t3 DescriptorSet 3
+               OpDecorate %t3 Binding 1
+               OpDecorate %t4 DescriptorSet 4
+               OpDecorate %t4 Binding 1
+               OpDecorate %t5 DescriptorSet 5
+               OpDecorate %t5 Binding 1
+               OpDecorate %t6 DescriptorSet 6
+               OpDecorate %t6 Binding 1
+               OpDecorate %t7 DescriptorSet 7
+               OpDecorate %t7 Binding 1
+               OpDecorate %t8 DescriptorSet 8
+               OpDecorate %t8 Binding 200
+               OpDecorate %t9 DescriptorSet 9
+               OpDecorate %t9 Binding 200
+               OpDecorate %t10 DescriptorSet 10
+               OpDecorate %t10 Binding 200
+               OpDecorate %t11 DescriptorSet 11
+               OpDecorate %t11 Binding 200
+               OpDecorate %t12 DescriptorSet 12
+               OpDecorate %t12 Binding 200
+               OpDecorate %t13 DescriptorSet 13
+               OpDecorate %t13 Binding 200
+               OpDecorate %t14 DescriptorSet 14
+               OpDecorate %t14 Binding 200
+               OpDecorate %t15 DescriptorSet 15
+               OpDecorate %t15 Binding 200
+               OpDecorate %s0 DescriptorSet 0
+               OpDecorate %s0 Binding 200
+               OpDecorate %s1 DescriptorSet 1
+               OpDecorate %s1 Binding 200
+               OpDecorate %s2 DescriptorSet 2
+               OpDecorate %s2 Binding 200
+               OpDecorate %s3 DescriptorSet 3
+               OpDecorate %s3 Binding 200
+               OpDecorate %s4 DescriptorSet 4
+               OpDecorate %s4 Binding 200
+               OpDecorate %s5 DescriptorSet 5
+               OpDecorate %s5 Binding 200
+               OpDecorate %s6 DescriptorSet 6
+               OpDecorate %s6 Binding 200
+               OpDecorate %s7 DescriptorSet 7
+               OpDecorate %s7 Binding 200
+               OpDecorate %s8 DescriptorSet 8
+               OpDecorate %s8 Binding 300
+               OpDecorate %s9 DescriptorSet 9
+               OpDecorate %s9 Binding 300
+               OpDecorate %s10 DescriptorSet 10
+               OpDecorate %s10 Binding 300
+               OpDecorate %s11 DescriptorSet 11
+               OpDecorate %s11 Binding 300
+               OpDecorate %s12 DescriptorSet 12
+               OpDecorate %s12 Binding 300
+               OpDecorate %s13 DescriptorSet 13
+               OpDecorate %s13 Binding 300
+               OpDecorate %s14 DescriptorSet 14
+               OpDecorate %s14 Binding 300
+               OpDecorate %s15 DescriptorSet 15
+               OpDecorate %s15 Binding 300
+      %float = OpTypeFloat 32
+          %S = OpTypeStruct %float
+%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
+         %b0 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b1 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b2 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b3 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b4 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b5 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b6 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+         %b7 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
+%_ptr_Uniform_S = OpTypePointer Uniform %S
+         %b8 = OpVariable %_ptr_Uniform_S Uniform
+         %b9 = OpVariable %_ptr_Uniform_S Uniform
+        %b10 = OpVariable %_ptr_Uniform_S Uniform
+        %b11 = OpVariable %_ptr_Uniform_S Uniform
+        %b12 = OpVariable %_ptr_Uniform_S Uniform
+        %b13 = OpVariable %_ptr_Uniform_S Uniform
+        %b14 = OpVariable %_ptr_Uniform_S Uniform
+        %b15 = OpVariable %_ptr_Uniform_S Uniform
+         %23 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_23 = OpTypePointer UniformConstant %23
+         %t0 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t1 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t2 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t3 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t4 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t5 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t6 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %t7 = OpVariable %_ptr_UniformConstant_23 UniformConstant
+         %33 = OpTypeImage %float 2D 1 0 0 1 Unknown
+%_ptr_UniformConstant_33 = OpTypePointer UniformConstant %33
+         %t8 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+         %t9 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+        %t10 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+        %t11 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+        %t12 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+        %t13 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+        %t14 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+        %t15 = OpVariable %_ptr_UniformConstant_33 UniformConstant
+         %43 = OpTypeSampler
+%_ptr_UniformConstant_43 = OpTypePointer UniformConstant %43
+         %s0 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s1 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s2 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s3 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s4 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s5 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s6 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+         %s7 = OpVariable %_ptr_UniformConstant_43 UniformConstant
+%_ptr_UniformConstant_43_0 = OpTypePointer UniformConstant %43
+         %s8 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+         %s9 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+        %s10 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+        %s11 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+        %s12 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+        %s13 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+        %s14 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+        %s15 = OpVariable %_ptr_UniformConstant_43_0 UniformConstant
+       %void = OpTypeVoid
+         %60 = OpTypeFunction %void
+       %main = OpFunction %void None %60
+         %63 = OpLabel
+         %65 = OpLoad %S %b0
+         %67 = OpLoad %S %b1
+         %69 = OpLoad %S %b2
+         %71 = OpLoad %S %b3
+         %73 = OpLoad %S %b4
+         %75 = OpLoad %S %b5
+         %77 = OpLoad %S %b6
+         %79 = OpLoad %S %b7
+         %81 = OpLoad %S %b8
+         %83 = OpLoad %S %b9
+         %85 = OpLoad %S %b10
+         %87 = OpLoad %S %b11
+         %89 = OpLoad %S %b12
+         %91 = OpLoad %S %b13
+         %93 = OpLoad %S %b14
+         %95 = OpLoad %S %b15
+         %97 = OpLoad %23 %t0
+         %99 = OpLoad %23 %t1
+        %101 = OpLoad %23 %t2
+        %103 = OpLoad %23 %t3
+        %105 = OpLoad %23 %t4
+        %107 = OpLoad %23 %t5
+        %109 = OpLoad %23 %t6
+        %111 = OpLoad %23 %t7
+        %113 = OpLoad %33 %t8
+        %115 = OpLoad %33 %t9
+        %117 = OpLoad %33 %t10
+        %119 = OpLoad %33 %t11
+        %121 = OpLoad %33 %t12
+        %123 = OpLoad %33 %t13
+        %125 = OpLoad %33 %t14
+        %127 = OpLoad %33 %t15
+        %129 = OpLoad %43 %s0
+        %131 = OpLoad %43 %s1
+        %133 = OpLoad %43 %s2
+        %135 = OpLoad %43 %s3
+        %137 = OpLoad %43 %s4
+        %139 = OpLoad %43 %s5
+        %141 = OpLoad %43 %s6
+        %143 = OpLoad %43 %s7
+        %145 = OpLoad %43 %s8
+        %147 = OpLoad %43 %s9
+        %149 = OpLoad %43 %s10
+        %151 = OpLoad %43 %s11
+        %153 = OpLoad %43 %s12
+        %155 = OpLoad %43 %s13
+        %157 = OpLoad %43 %s14
+        %159 = OpLoad %43 %s15
+               OpReturn
+               OpFunctionEnd
diff --git a/test/bug/tint/959.wgsl.expected.wgsl b/test/bug/tint/959.wgsl.expected.wgsl
new file mode 100644
index 0000000..925d3da
--- /dev/null
+++ b/test/bug/tint/959.wgsl.expected.wgsl
@@ -0,0 +1,152 @@
+[[block]]
+struct S {
+  a : f32;
+};
+
+[[group(0), binding(0)]] var<storage> b0 : S;
+
+[[group(1), binding(0)]] var<storage> b1 : S;
+
+[[group(2), binding(0)]] var<storage> b2 : S;
+
+[[group(3), binding(0)]] var<storage> b3 : S;
+
+[[group(4), binding(0)]] var<storage> b4 : S;
+
+[[group(5), binding(0)]] var<storage> b5 : S;
+
+[[group(6), binding(0)]] var<storage> b6 : S;
+
+[[group(7), binding(0)]] var<storage> b7 : S;
+
+[[group(9), binding(1)]] var<uniform> b8 : S;
+
+[[group(8), binding(1)]] var<uniform> b9 : S;
+
+[[group(10), binding(1)]] var<uniform> b10 : S;
+
+[[group(11), binding(1)]] var<uniform> b11 : S;
+
+[[group(12), binding(1)]] var<uniform> b12 : S;
+
+[[group(13), binding(1)]] var<uniform> b13 : S;
+
+[[group(14), binding(1)]] var<uniform> b14 : S;
+
+[[group(15), binding(1)]] var<uniform> b15 : S;
+
+[[group(0), binding(1)]] var t0 : texture_2d<f32>;
+
+[[group(1), binding(1)]] var t1 : texture_2d<f32>;
+
+[[group(2), binding(1)]] var t2 : texture_2d<f32>;
+
+[[group(3), binding(1)]] var t3 : texture_2d<f32>;
+
+[[group(4), binding(1)]] var t4 : texture_2d<f32>;
+
+[[group(5), binding(1)]] var t5 : texture_2d<f32>;
+
+[[group(6), binding(1)]] var t6 : texture_2d<f32>;
+
+[[group(7), binding(1)]] var t7 : texture_2d<f32>;
+
+[[group(8), binding(200)]] var t8 : texture_depth_2d;
+
+[[group(9), binding(200)]] var t9 : texture_depth_2d;
+
+[[group(10), binding(200)]] var t10 : texture_depth_2d;
+
+[[group(11), binding(200)]] var t11 : texture_depth_2d;
+
+[[group(12), binding(200)]] var t12 : texture_depth_2d;
+
+[[group(13), binding(200)]] var t13 : texture_depth_2d;
+
+[[group(14), binding(200)]] var t14 : texture_depth_2d;
+
+[[group(15), binding(200)]] var t15 : texture_depth_2d;
+
+[[group(0), binding(200)]] var s0 : sampler;
+
+[[group(1), binding(200)]] var s1 : sampler;
+
+[[group(2), binding(200)]] var s2 : sampler;
+
+[[group(3), binding(200)]] var s3 : sampler;
+
+[[group(4), binding(200)]] var s4 : sampler;
+
+[[group(5), binding(200)]] var s5 : sampler;
+
+[[group(6), binding(200)]] var s6 : sampler;
+
+[[group(7), binding(200)]] var s7 : sampler;
+
+[[group(8), binding(300)]] var s8 : sampler_comparison;
+
+[[group(9), binding(300)]] var s9 : sampler_comparison;
+
+[[group(10), binding(300)]] var s10 : sampler_comparison;
+
+[[group(11), binding(300)]] var s11 : sampler_comparison;
+
+[[group(12), binding(300)]] var s12 : sampler_comparison;
+
+[[group(13), binding(300)]] var s13 : sampler_comparison;
+
+[[group(14), binding(300)]] var s14 : sampler_comparison;
+
+[[group(15), binding(300)]] var s15 : sampler_comparison;
+
+[[stage(fragment)]]
+fn main() {
+  ignore(b0);
+  ignore(b1);
+  ignore(b2);
+  ignore(b3);
+  ignore(b4);
+  ignore(b5);
+  ignore(b6);
+  ignore(b7);
+  ignore(b8);
+  ignore(b9);
+  ignore(b10);
+  ignore(b11);
+  ignore(b12);
+  ignore(b13);
+  ignore(b14);
+  ignore(b15);
+  ignore(t0);
+  ignore(t1);
+  ignore(t2);
+  ignore(t3);
+  ignore(t4);
+  ignore(t5);
+  ignore(t6);
+  ignore(t7);
+  ignore(t8);
+  ignore(t9);
+  ignore(t10);
+  ignore(t11);
+  ignore(t12);
+  ignore(t13);
+  ignore(t14);
+  ignore(t15);
+  ignore(s0);
+  ignore(s1);
+  ignore(s2);
+  ignore(s3);
+  ignore(s4);
+  ignore(s5);
+  ignore(s6);
+  ignore(s7);
+  ignore(s8);
+  ignore(s9);
+  ignore(s10);
+  ignore(s11);
+  ignore(s12);
+  ignore(s13);
+  ignore(s14);
+  ignore(s15);
+}
diff --git a/test/bug/tint/977.spvasm.expected.msl b/test/bug/tint/977.spvasm.expected.msl
index 6be13c6..fc98b33 100644
--- a/test/bug/tint/977.spvasm.expected.msl
+++ b/test/bug/tint/977.spvasm.expected.msl
@@ -58,7 +58,7 @@
   main_1(resultMatrix, tint_symbol_3);
 }
 
-kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix& resultMatrix [[buffer(2)]]) {
+kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix& resultMatrix [[buffer(0)]]) {
   thread uint3 tint_symbol_4 = 0u;
   tint_symbol_1_inner(resultMatrix, gl_GlobalInvocationID_param, &(tint_symbol_4));
   return;
diff --git a/test/bug/tint/978.wgsl.expected.msl b/test/bug/tint/978.wgsl.expected.msl
index 8f62eda..737a2bd 100644
--- a/test/bug/tint/978.wgsl.expected.msl
+++ b/test/bug/tint/978.wgsl.expected.msl
@@ -22,7 +22,7 @@
   return fOut;
 }
 
-fragment tint_symbol_3 tint_symbol(depth2d<float, access::sample> tint_symbol_7 [[texture(5)]], sampler tint_symbol_8 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+fragment tint_symbol_3 tint_symbol(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
   FragmentInput const tint_symbol_4 = {.vUv=tint_symbol_1.vUv};
   FragmentOutput const inner_result = tint_symbol_inner(tint_symbol_4, tint_symbol_7, tint_symbol_8);
   tint_symbol_3 wrapper_result = {};
diff --git a/test/bug/tint/993.wgsl.expected.msl b/test/bug/tint/993.wgsl.expected.msl
index 50f64ad..feb676a 100644
--- a/test/bug/tint/993.wgsl.expected.msl
+++ b/test/bug/tint/993.wgsl.expected.msl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
 #include <metal_stdlib>
 
 using namespace metal;
@@ -20,15 +18,8 @@
   return atomic_load_explicit(&(s.data.arr[(0u + uint(constants.zero))]), memory_order_relaxed);
 }
 
-kernel void tint_symbol(constant Constants& constants [[buffer(0)]], device Result& result [[buffer(1)]], device TestData& s [[buffer(0)]]) {
+kernel void tint_symbol(constant Constants& constants [[buffer(0)]], device Result& result [[buffer(1)]], device TestData& s [[buffer(2)]]) {
   result.value = uint(runTest(constants, s));
   return;
 }
 
-Compilation failed: 
-
-program_source:21:124: error: cannot reserve 'buffer' resource location at index 0
-kernel void tint_symbol(constant Constants& constants [[buffer(0)]], device Result& result [[buffer(1)]], device TestData& s [[buffer(0)]]) {
-                                                                                                                           ^
-
-
diff --git a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
index 562d9e2..dfb7484 100644
--- a/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/1588cd.wgsl.expected.msl
@@ -12,7 +12,7 @@
 };
 
 void arrayLength_1588cd(constant tint_symbol_1& tint_symbol_2) {
-  uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u);
+  uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
 }
 
 float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
diff --git a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
index dc92420..9ccd171 100644
--- a/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/a0f5ca.wgsl.expected.msl
@@ -12,7 +12,7 @@
 };
 
 void arrayLength_a0f5ca(constant tint_symbol_1& tint_symbol_2) {
-  uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u);
+  uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
 }
 
 float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
diff --git a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
index 7d6d8ef..2a68d7b 100644
--- a/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
+++ b/test/intrinsics/gen/arrayLength/cfca0a.wgsl.expected.msl
@@ -12,7 +12,7 @@
 };
 
 void arrayLength_cfca0a(constant tint_symbol_1& tint_symbol_2) {
-  uint res = ((tint_symbol_2.buffer_size[0u][1u] - 0u) / 4u);
+  uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
 }
 
 float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.msl b/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.msl
index 441370a..13ceaa0 100644
--- a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), 1, int2());
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_02aa9b(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.msl b/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.msl
index 05ed18b..0d15b26 100644
--- a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3(), int3());
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_100dc0(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.msl b/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.msl
index 8ad544c..8fc7af4 100644
--- a/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/38bbb9.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample(tint_symbol_1, float2());
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_38bbb9(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.msl b/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.msl
index d57dfcf..2d5945b 100644
--- a/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/3b50bd.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3());
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_3b50bd(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.msl b/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.msl
index 998b9a1..3424a0e 100644
--- a/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/4dd1bf.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3(), 1);
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_4dd1bf(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.msl b/test/intrinsics/gen/textureSample/51b514.wgsl.expected.msl
index 14061e5..85ec0ef 100644
--- a/test/intrinsics/gen/textureSample/51b514.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/51b514.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2());
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_51b514(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.msl b/test/intrinsics/gen/textureSample/667d76.wgsl.expected.msl
index 7867b20..06381b0 100644
--- a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/667d76.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample(tint_symbol_1, float2(), int2());
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_667d76(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.msl b/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.msl
index 680880f..9753b10 100644
--- a/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/6717ca.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), 1);
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_6717ca(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.msl b/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.msl
index b267adb..03d92d6 100644
--- a/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/6e64fb.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, 1.0f);
 }
 
-fragment void fragment_main(texture1d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_6e64fb(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.msl b/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.msl
index 9b66478..2e192ca 100644
--- a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), int2());
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_7c3baa(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.msl b/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.msl
index 51555bc..6b7b50b 100644
--- a/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/7e9ffd.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample(tint_symbol_1, float2(), 1);
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_7e9ffd(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.msl b/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.msl
index 2673827..a2c56ff 100644
--- a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample(tint_symbol_1, float2(), 1, int2());
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_8522e7(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.msl b/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.msl
index b6269f6..824463d 100644
--- a/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/c2f4e8.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample(tint_symbol_1, float3(), 1);
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_c2f4e8(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.msl b/test/intrinsics/gen/textureSample/e53267.wgsl.expected.msl
index d2726ea..b7190c8 100644
--- a/test/intrinsics/gen/textureSample/e53267.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/e53267.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3());
 }
 
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_e53267(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.msl b/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.msl
index 84cbeac..3497e15 100644
--- a/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSample/ea7030.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample(tint_symbol_1, float3());
 }
 
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSample_ea7030(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.msl
index fed3c2a..675e006 100644
--- a/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/53b9f7.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3(), bias(1.0f));
 }
 
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_53b9f7(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.msl
index b524707..ee80213 100644
--- a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), 1, bias(1.0f), int2());
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_65ac50(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.msl
index 32ca94e..aae831b 100644
--- a/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/6a9113.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), bias(1.0f));
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_6a9113(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.msl
index a0bcaf3..357833d 100644
--- a/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/80e579.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), 1, bias(1.0f));
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_80e579(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.msl
index cc9704b..2d6dacd 100644
--- a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float2(), bias(1.0f), int2());
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_81c19a(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.msl
index 459f852..80a9324 100644
--- a/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/d3fa1b.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3(), bias(1.0f));
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_d3fa1b(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.msl
index 679cfa2..3126114 100644
--- a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3(), bias(1.0f), int3());
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_df91bb(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.msl
index 6c3eee0..123b4f1 100644
--- a/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleBias/eed7c4.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float4 res = tint_symbol.sample(tint_symbol_1, float3(), 1, bias(1.0f));
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleBias_eed7c4(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.msl
index aadfa63..f076683 100644
--- a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample_compare(tint_symbol_1, float2(), 1.0f, int2());
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleCompare_25fcd1(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.msl
index 34fff8c..eb88f71 100644
--- a/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompare/3a5923.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample_compare(tint_symbol_1, float2(), 1.0f);
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleCompare_3a5923(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.msl
index 81a2824..a0bb49b 100644
--- a/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompare/63fb83.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample_compare(tint_symbol_1, float3(), 1.0f);
 }
 
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleCompare_63fb83(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.msl
index ddfa6a6..d92c04c 100644
--- a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample_compare(tint_symbol_1, float2(), 1, 1.0f, int2());
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleCompare_98b85c(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl
index c9ea045..abb06a0 100644
--- a/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompare/a3ca7e.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample_compare(tint_symbol_1, float3(), 1, 1.0f);
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleCompare_a3ca7e(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.msl
index 821659d..3b9cc89 100644
--- a/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompare/dd431d.wgsl.expected.msl
@@ -5,7 +5,7 @@
   float res = tint_symbol.sample_compare(tint_symbol_1, float2(), 1, 1.0f);
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
   textureSampleCompare_dd431d(tint_symbol_2, tint_symbol_3);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
index 3b3c683..73b0c18 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleCompareLevel_011a8f(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleCompareLevel_011a8f(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
index a960b68..b60dcc0 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/1116ed.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleCompareLevel_1116ed(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleCompareLevel_1116ed(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
index d0d7d39..f021d80 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/1568e3.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleCompareLevel_1568e3(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleCompareLevel_1568e3(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
index ec4036b..4697c85 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleCompareLevel_2ad2b1(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleCompareLevel_2ad2b1(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
index 6ff319f..7bef512 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleCompareLevel_4cf3a2(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleCompareLevel_4cf3a2(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
index 13a12be..d18e34c 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleCompareLevel_f8121c(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleCompareLevel_f8121c(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
index a287050..f44e7d5 100644
--- a/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/21402b.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_21402b(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_21402b(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
index d358769..8c63d94 100644
--- a/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/2ecd8f.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_2ecd8f(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_2ecd8f(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
index e51e717..340a1f7 100644
--- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_468f88(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_468f88(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
index b777495..a2da7c2 100644
--- a/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/521263.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_521263(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_521263(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
index 8feeefc..ae5bec6 100644
--- a/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/5312f4.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_5312f4(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_5312f4(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
index b343742..5ed27aa 100644
--- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_872f00(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_872f00(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
index 5316216..3cd832a 100644
--- a/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/e383db.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_e383db(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_e383db(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
index 8da1b01..8742f68 100644
--- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleGrad_e9a2f7(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleGrad_e9a2f7(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
index e044bbd..5dd9b81 100644
--- a/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/02be59.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_02be59(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_02be59(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
index 1dedfaa..566e4dc 100644
--- a/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/0bdd9a.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_0bdd9a(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_0bdd9a(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
index 31fec00..8af50d5 100644
--- a/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/1b0291.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_1b0291(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_1b0291(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
index 8a195e2..7607d29 100644
--- a/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/1bf73e.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_1bf73e(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_1bf73e(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
index b0ab284..025fb43 100644
--- a/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/302be4.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_302be4(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_302be4(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
index fed118a..542fdf1 100644
--- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_47daa4(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_47daa4(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
index a077b7d..402c509 100644
--- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_690d95(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_690d95(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
index 9e703fc..e002695 100644
--- a/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/979816.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_979816(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_979816(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
index 635aa58..2baa149 100644
--- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_9bd37b(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_9bd37b(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
index 5d3ef95..c9d14ff 100644
--- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_a4af26(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_a4af26(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
index 5a60388..601c19f 100644
--- a/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/abfcc0.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_abfcc0(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_abfcc0(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
index 47fae9b..0a54672 100644
--- a/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/ae5e39.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_ae5e39(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_ae5e39(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
index 1bde28f..0435ba3 100644
--- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_ba93b3(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_ba93b3(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
index 3a24298..d2bc371 100644
--- a/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/c32df7.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_c32df7(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_c32df7(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
index e3c3831..a07b0ef 100644
--- a/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
+++ b/test/intrinsics/gen/textureSampleLevel/c6aca6.wgsl.expected.msl
@@ -14,19 +14,19 @@
   return float4();
 }
 
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
   float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
   tint_symbol wrapper_result = {};
   wrapper_result.value = inner_result;
   return wrapper_result;
 }
 
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(1)]]) {
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
   textureSampleLevel_c6aca6(tint_symbol_7, tint_symbol_8);
   return;
 }
 
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(1)]]) {
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
   textureSampleLevel_c6aca6(tint_symbol_9, tint_symbol_10);
   return;
 }
diff --git a/test/types/texture/storage/1d.wgsl.expected.msl b/test/types/texture/storage/1d.wgsl.expected.msl
index b088b6a..0c533ae 100644
--- a/test/types/texture/storage/1d.wgsl.expected.msl
+++ b/test/types/texture/storage/1d.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(texture1d<float, access::read> tint_symbol_1 [[texture(0)]], texture1d<float, access::read> tint_symbol_2 [[texture(1)]], texture1d<uint, access::read> tint_symbol_3 [[texture(2)]], texture1d<int, access::read> tint_symbol_4 [[texture(3)]], texture1d<uint, access::read> tint_symbol_5 [[texture(4)]], texture1d<int, access::read> tint_symbol_6 [[texture(5)]], texture1d<float, access::read> tint_symbol_7 [[texture(6)]], texture1d<uint, access::read> tint_symbol_8 [[texture(7)]], texture1d<int, access::read> tint_symbol_9 [[texture(8)]], texture1d<float, access::read> tint_symbol_10 [[texture(9)]], texture1d<uint, access::read> tint_symbol_11 [[texture(10)]], texture1d<int, access::read> tint_symbol_12 [[texture(11)]], texture1d<float, access::read> tint_symbol_13 [[texture(12)]], texture1d<uint, access::read> tint_symbol_14 [[texture(13)]], texture1d<int, access::read> tint_symbol_15 [[texture(14)]], texture1d<float, access::read> tint_symbol_16 [[texture(15)]], texture1d<float, access::write> tint_symbol_17 [[texture(50)]], texture1d<float, access::write> tint_symbol_18 [[texture(51)]], texture1d<uint, access::write> tint_symbol_19 [[texture(52)]], texture1d<int, access::write> tint_symbol_20 [[texture(53)]], texture1d<uint, access::write> tint_symbol_21 [[texture(54)]], texture1d<int, access::write> tint_symbol_22 [[texture(55)]], texture1d<float, access::write> tint_symbol_23 [[texture(56)]], texture1d<uint, access::write> tint_symbol_24 [[texture(57)]], texture1d<int, access::write> tint_symbol_25 [[texture(58)]], texture1d<float, access::write> tint_symbol_26 [[texture(59)]], texture1d<uint, access::write> tint_symbol_27 [[texture(60)]], texture1d<int, access::write> tint_symbol_28 [[texture(61)]], texture1d<float, access::write> tint_symbol_29 [[texture(62)]], texture1d<uint, access::write> tint_symbol_30 [[texture(63)]], texture1d<int, access::write> tint_symbol_31 [[texture(64)]], texture1d<float, access::write> tint_symbol_32 [[texture(65)]]) {
+kernel void tint_symbol(texture1d<float, access::read> tint_symbol_1 [[texture(0)]], texture1d<float, access::read> tint_symbol_2 [[texture(1)]], texture1d<uint, access::read> tint_symbol_3 [[texture(2)]], texture1d<int, access::read> tint_symbol_4 [[texture(3)]], texture1d<uint, access::read> tint_symbol_5 [[texture(4)]], texture1d<int, access::read> tint_symbol_6 [[texture(5)]], texture1d<float, access::read> tint_symbol_7 [[texture(6)]], texture1d<uint, access::read> tint_symbol_8 [[texture(7)]], texture1d<int, access::read> tint_symbol_9 [[texture(8)]], texture1d<float, access::read> tint_symbol_10 [[texture(9)]], texture1d<uint, access::read> tint_symbol_11 [[texture(10)]], texture1d<int, access::read> tint_symbol_12 [[texture(11)]], texture1d<float, access::read> tint_symbol_13 [[texture(12)]], texture1d<uint, access::read> tint_symbol_14 [[texture(13)]], texture1d<int, access::read> tint_symbol_15 [[texture(14)]], texture1d<float, access::read> tint_symbol_16 [[texture(15)]], texture1d<float, access::write> tint_symbol_17 [[texture(16)]], texture1d<float, access::write> tint_symbol_18 [[texture(17)]], texture1d<uint, access::write> tint_symbol_19 [[texture(18)]], texture1d<int, access::write> tint_symbol_20 [[texture(19)]], texture1d<uint, access::write> tint_symbol_21 [[texture(20)]], texture1d<int, access::write> tint_symbol_22 [[texture(21)]], texture1d<float, access::write> tint_symbol_23 [[texture(22)]], texture1d<uint, access::write> tint_symbol_24 [[texture(23)]], texture1d<int, access::write> tint_symbol_25 [[texture(24)]], texture1d<float, access::write> tint_symbol_26 [[texture(25)]], texture1d<uint, access::write> tint_symbol_27 [[texture(26)]], texture1d<int, access::write> tint_symbol_28 [[texture(27)]], texture1d<float, access::write> tint_symbol_29 [[texture(28)]], texture1d<uint, access::write> tint_symbol_30 [[texture(29)]], texture1d<int, access::write> tint_symbol_31 [[texture(30)]], texture1d<float, access::write> tint_symbol_32 [[texture(31)]]) {
   (void) tint_symbol_1;
   (void) tint_symbol_2;
   (void) tint_symbol_3;
diff --git a/test/types/texture/storage/2d.wgsl.expected.msl b/test/types/texture/storage/2d.wgsl.expected.msl
index ca5b9a1..7ee93d1 100644
--- a/test/types/texture/storage/2d.wgsl.expected.msl
+++ b/test/types/texture/storage/2d.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(texture2d<float, access::read> tint_symbol_1 [[texture(0)]], texture2d<float, access::read> tint_symbol_2 [[texture(1)]], texture2d<uint, access::read> tint_symbol_3 [[texture(2)]], texture2d<int, access::read> tint_symbol_4 [[texture(3)]], texture2d<uint, access::read> tint_symbol_5 [[texture(4)]], texture2d<int, access::read> tint_symbol_6 [[texture(5)]], texture2d<float, access::read> tint_symbol_7 [[texture(6)]], texture2d<uint, access::read> tint_symbol_8 [[texture(7)]], texture2d<int, access::read> tint_symbol_9 [[texture(8)]], texture2d<float, access::read> tint_symbol_10 [[texture(9)]], texture2d<uint, access::read> tint_symbol_11 [[texture(10)]], texture2d<int, access::read> tint_symbol_12 [[texture(11)]], texture2d<float, access::read> tint_symbol_13 [[texture(12)]], texture2d<uint, access::read> tint_symbol_14 [[texture(13)]], texture2d<int, access::read> tint_symbol_15 [[texture(14)]], texture2d<float, access::read> tint_symbol_16 [[texture(15)]], texture2d<float, access::write> tint_symbol_17 [[texture(50)]], texture2d<float, access::write> tint_symbol_18 [[texture(51)]], texture2d<uint, access::write> tint_symbol_19 [[texture(52)]], texture2d<int, access::write> tint_symbol_20 [[texture(53)]], texture2d<uint, access::write> tint_symbol_21 [[texture(54)]], texture2d<int, access::write> tint_symbol_22 [[texture(55)]], texture2d<float, access::write> tint_symbol_23 [[texture(56)]], texture2d<uint, access::write> tint_symbol_24 [[texture(57)]], texture2d<int, access::write> tint_symbol_25 [[texture(58)]], texture2d<float, access::write> tint_symbol_26 [[texture(59)]], texture2d<uint, access::write> tint_symbol_27 [[texture(60)]], texture2d<int, access::write> tint_symbol_28 [[texture(61)]], texture2d<float, access::write> tint_symbol_29 [[texture(62)]], texture2d<uint, access::write> tint_symbol_30 [[texture(63)]], texture2d<int, access::write> tint_symbol_31 [[texture(64)]], texture2d<float, access::write> tint_symbol_32 [[texture(65)]]) {
+kernel void tint_symbol(texture2d<float, access::read> tint_symbol_1 [[texture(0)]], texture2d<float, access::read> tint_symbol_2 [[texture(1)]], texture2d<uint, access::read> tint_symbol_3 [[texture(2)]], texture2d<int, access::read> tint_symbol_4 [[texture(3)]], texture2d<uint, access::read> tint_symbol_5 [[texture(4)]], texture2d<int, access::read> tint_symbol_6 [[texture(5)]], texture2d<float, access::read> tint_symbol_7 [[texture(6)]], texture2d<uint, access::read> tint_symbol_8 [[texture(7)]], texture2d<int, access::read> tint_symbol_9 [[texture(8)]], texture2d<float, access::read> tint_symbol_10 [[texture(9)]], texture2d<uint, access::read> tint_symbol_11 [[texture(10)]], texture2d<int, access::read> tint_symbol_12 [[texture(11)]], texture2d<float, access::read> tint_symbol_13 [[texture(12)]], texture2d<uint, access::read> tint_symbol_14 [[texture(13)]], texture2d<int, access::read> tint_symbol_15 [[texture(14)]], texture2d<float, access::read> tint_symbol_16 [[texture(15)]], texture2d<float, access::write> tint_symbol_17 [[texture(16)]], texture2d<float, access::write> tint_symbol_18 [[texture(17)]], texture2d<uint, access::write> tint_symbol_19 [[texture(18)]], texture2d<int, access::write> tint_symbol_20 [[texture(19)]], texture2d<uint, access::write> tint_symbol_21 [[texture(20)]], texture2d<int, access::write> tint_symbol_22 [[texture(21)]], texture2d<float, access::write> tint_symbol_23 [[texture(22)]], texture2d<uint, access::write> tint_symbol_24 [[texture(23)]], texture2d<int, access::write> tint_symbol_25 [[texture(24)]], texture2d<float, access::write> tint_symbol_26 [[texture(25)]], texture2d<uint, access::write> tint_symbol_27 [[texture(26)]], texture2d<int, access::write> tint_symbol_28 [[texture(27)]], texture2d<float, access::write> tint_symbol_29 [[texture(28)]], texture2d<uint, access::write> tint_symbol_30 [[texture(29)]], texture2d<int, access::write> tint_symbol_31 [[texture(30)]], texture2d<float, access::write> tint_symbol_32 [[texture(31)]]) {
   (void) tint_symbol_1;
   (void) tint_symbol_2;
   (void) tint_symbol_3;
diff --git a/test/types/texture/storage/2d_array.wgsl.expected.msl b/test/types/texture/storage/2d_array.wgsl.expected.msl
index 9678bd3..32af749 100644
--- a/test/types/texture/storage/2d_array.wgsl.expected.msl
+++ b/test/types/texture/storage/2d_array.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(texture2d_array<float, access::read> tint_symbol_1 [[texture(0)]], texture2d_array<float, access::read> tint_symbol_2 [[texture(1)]], texture2d_array<uint, access::read> tint_symbol_3 [[texture(2)]], texture2d_array<int, access::read> tint_symbol_4 [[texture(3)]], texture2d_array<uint, access::read> tint_symbol_5 [[texture(4)]], texture2d_array<int, access::read> tint_symbol_6 [[texture(5)]], texture2d_array<float, access::read> tint_symbol_7 [[texture(6)]], texture2d_array<uint, access::read> tint_symbol_8 [[texture(7)]], texture2d_array<int, access::read> tint_symbol_9 [[texture(8)]], texture2d_array<float, access::read> tint_symbol_10 [[texture(9)]], texture2d_array<uint, access::read> tint_symbol_11 [[texture(10)]], texture2d_array<int, access::read> tint_symbol_12 [[texture(11)]], texture2d_array<float, access::read> tint_symbol_13 [[texture(12)]], texture2d_array<uint, access::read> tint_symbol_14 [[texture(13)]], texture2d_array<int, access::read> tint_symbol_15 [[texture(14)]], texture2d_array<float, access::read> tint_symbol_16 [[texture(15)]], texture2d_array<float, access::write> tint_symbol_17 [[texture(50)]], texture2d_array<float, access::write> tint_symbol_18 [[texture(51)]], texture2d_array<uint, access::write> tint_symbol_19 [[texture(52)]], texture2d_array<int, access::write> tint_symbol_20 [[texture(53)]], texture2d_array<uint, access::write> tint_symbol_21 [[texture(54)]], texture2d_array<int, access::write> tint_symbol_22 [[texture(55)]], texture2d_array<float, access::write> tint_symbol_23 [[texture(56)]], texture2d_array<uint, access::write> tint_symbol_24 [[texture(57)]], texture2d_array<int, access::write> tint_symbol_25 [[texture(58)]], texture2d_array<float, access::write> tint_symbol_26 [[texture(59)]], texture2d_array<uint, access::write> tint_symbol_27 [[texture(60)]], texture2d_array<int, access::write> tint_symbol_28 [[texture(61)]], texture2d_array<float, access::write> tint_symbol_29 [[texture(62)]], texture2d_array<uint, access::write> tint_symbol_30 [[texture(63)]], texture2d_array<int, access::write> tint_symbol_31 [[texture(64)]], texture2d_array<float, access::write> tint_symbol_32 [[texture(65)]]) {
+kernel void tint_symbol(texture2d_array<float, access::read> tint_symbol_1 [[texture(0)]], texture2d_array<float, access::read> tint_symbol_2 [[texture(1)]], texture2d_array<uint, access::read> tint_symbol_3 [[texture(2)]], texture2d_array<int, access::read> tint_symbol_4 [[texture(3)]], texture2d_array<uint, access::read> tint_symbol_5 [[texture(4)]], texture2d_array<int, access::read> tint_symbol_6 [[texture(5)]], texture2d_array<float, access::read> tint_symbol_7 [[texture(6)]], texture2d_array<uint, access::read> tint_symbol_8 [[texture(7)]], texture2d_array<int, access::read> tint_symbol_9 [[texture(8)]], texture2d_array<float, access::read> tint_symbol_10 [[texture(9)]], texture2d_array<uint, access::read> tint_symbol_11 [[texture(10)]], texture2d_array<int, access::read> tint_symbol_12 [[texture(11)]], texture2d_array<float, access::read> tint_symbol_13 [[texture(12)]], texture2d_array<uint, access::read> tint_symbol_14 [[texture(13)]], texture2d_array<int, access::read> tint_symbol_15 [[texture(14)]], texture2d_array<float, access::read> tint_symbol_16 [[texture(15)]], texture2d_array<float, access::write> tint_symbol_17 [[texture(16)]], texture2d_array<float, access::write> tint_symbol_18 [[texture(17)]], texture2d_array<uint, access::write> tint_symbol_19 [[texture(18)]], texture2d_array<int, access::write> tint_symbol_20 [[texture(19)]], texture2d_array<uint, access::write> tint_symbol_21 [[texture(20)]], texture2d_array<int, access::write> tint_symbol_22 [[texture(21)]], texture2d_array<float, access::write> tint_symbol_23 [[texture(22)]], texture2d_array<uint, access::write> tint_symbol_24 [[texture(23)]], texture2d_array<int, access::write> tint_symbol_25 [[texture(24)]], texture2d_array<float, access::write> tint_symbol_26 [[texture(25)]], texture2d_array<uint, access::write> tint_symbol_27 [[texture(26)]], texture2d_array<int, access::write> tint_symbol_28 [[texture(27)]], texture2d_array<float, access::write> tint_symbol_29 [[texture(28)]], texture2d_array<uint, access::write> tint_symbol_30 [[texture(29)]], texture2d_array<int, access::write> tint_symbol_31 [[texture(30)]], texture2d_array<float, access::write> tint_symbol_32 [[texture(31)]]) {
   (void) tint_symbol_1;
   (void) tint_symbol_2;
   (void) tint_symbol_3;
diff --git a/test/types/texture/storage/3d.wgsl.expected.msl b/test/types/texture/storage/3d.wgsl.expected.msl
index 5783c35..dc693f8 100644
--- a/test/types/texture/storage/3d.wgsl.expected.msl
+++ b/test/types/texture/storage/3d.wgsl.expected.msl
@@ -1,7 +1,7 @@
 #include <metal_stdlib>
 
 using namespace metal;
-kernel void tint_symbol(texture3d<float, access::read> tint_symbol_1 [[texture(0)]], texture3d<float, access::read> tint_symbol_2 [[texture(1)]], texture3d<uint, access::read> tint_symbol_3 [[texture(2)]], texture3d<int, access::read> tint_symbol_4 [[texture(3)]], texture3d<uint, access::read> tint_symbol_5 [[texture(4)]], texture3d<int, access::read> tint_symbol_6 [[texture(5)]], texture3d<float, access::read> tint_symbol_7 [[texture(6)]], texture3d<uint, access::read> tint_symbol_8 [[texture(7)]], texture3d<int, access::read> tint_symbol_9 [[texture(8)]], texture3d<float, access::read> tint_symbol_10 [[texture(9)]], texture3d<uint, access::read> tint_symbol_11 [[texture(10)]], texture3d<int, access::read> tint_symbol_12 [[texture(11)]], texture3d<float, access::read> tint_symbol_13 [[texture(12)]], texture3d<uint, access::read> tint_symbol_14 [[texture(13)]], texture3d<int, access::read> tint_symbol_15 [[texture(14)]], texture3d<float, access::read> tint_symbol_16 [[texture(15)]], texture3d<float, access::write> tint_symbol_17 [[texture(50)]], texture3d<float, access::write> tint_symbol_18 [[texture(51)]], texture3d<uint, access::write> tint_symbol_19 [[texture(52)]], texture3d<int, access::write> tint_symbol_20 [[texture(53)]], texture3d<uint, access::write> tint_symbol_21 [[texture(54)]], texture3d<int, access::write> tint_symbol_22 [[texture(55)]], texture3d<float, access::write> tint_symbol_23 [[texture(56)]], texture3d<uint, access::write> tint_symbol_24 [[texture(57)]], texture3d<int, access::write> tint_symbol_25 [[texture(58)]], texture3d<float, access::write> tint_symbol_26 [[texture(59)]], texture3d<uint, access::write> tint_symbol_27 [[texture(60)]], texture3d<int, access::write> tint_symbol_28 [[texture(61)]], texture3d<float, access::write> tint_symbol_29 [[texture(62)]], texture3d<uint, access::write> tint_symbol_30 [[texture(63)]], texture3d<int, access::write> tint_symbol_31 [[texture(64)]], texture3d<float, access::write> tint_symbol_32 [[texture(65)]]) {
+kernel void tint_symbol(texture3d<float, access::read> tint_symbol_1 [[texture(0)]], texture3d<float, access::read> tint_symbol_2 [[texture(1)]], texture3d<uint, access::read> tint_symbol_3 [[texture(2)]], texture3d<int, access::read> tint_symbol_4 [[texture(3)]], texture3d<uint, access::read> tint_symbol_5 [[texture(4)]], texture3d<int, access::read> tint_symbol_6 [[texture(5)]], texture3d<float, access::read> tint_symbol_7 [[texture(6)]], texture3d<uint, access::read> tint_symbol_8 [[texture(7)]], texture3d<int, access::read> tint_symbol_9 [[texture(8)]], texture3d<float, access::read> tint_symbol_10 [[texture(9)]], texture3d<uint, access::read> tint_symbol_11 [[texture(10)]], texture3d<int, access::read> tint_symbol_12 [[texture(11)]], texture3d<float, access::read> tint_symbol_13 [[texture(12)]], texture3d<uint, access::read> tint_symbol_14 [[texture(13)]], texture3d<int, access::read> tint_symbol_15 [[texture(14)]], texture3d<float, access::read> tint_symbol_16 [[texture(15)]], texture3d<float, access::write> tint_symbol_17 [[texture(16)]], texture3d<float, access::write> tint_symbol_18 [[texture(17)]], texture3d<uint, access::write> tint_symbol_19 [[texture(18)]], texture3d<int, access::write> tint_symbol_20 [[texture(19)]], texture3d<uint, access::write> tint_symbol_21 [[texture(20)]], texture3d<int, access::write> tint_symbol_22 [[texture(21)]], texture3d<float, access::write> tint_symbol_23 [[texture(22)]], texture3d<uint, access::write> tint_symbol_24 [[texture(23)]], texture3d<int, access::write> tint_symbol_25 [[texture(24)]], texture3d<float, access::write> tint_symbol_26 [[texture(25)]], texture3d<uint, access::write> tint_symbol_27 [[texture(26)]], texture3d<int, access::write> tint_symbol_28 [[texture(27)]], texture3d<float, access::write> tint_symbol_29 [[texture(28)]], texture3d<uint, access::write> tint_symbol_30 [[texture(29)]], texture3d<int, access::write> tint_symbol_31 [[texture(30)]], texture3d<float, access::write> tint_symbol_32 [[texture(31)]]) {
   (void) tint_symbol_1;
   (void) tint_symbol_2;
   (void) tint_symbol_3;
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index fbafb59..b389a5b 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 0dfc657..b53ddd8 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<uint, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<uint, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index 97b86f3..9b762e1 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<int, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<int, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 825caa6..2f5f0ee 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index f4ed887..4af0fd0 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<uint, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<uint, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
index 0ffbcb3..6708165 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<int, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<int, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
index 4375a78..ec6c455 100644
--- a/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertResultSignedness_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index 4561db6..d331808 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index 62c3466..ac7b571 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index f737a4f..9c67b74 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index 34f26c7..6cf7258 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index dab454b..c04d539 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture1d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index 2f05d2b..5e9c742 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture1d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
index 9e8165d..655b96b 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
index 6713b54..a9ede45 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl
index 5e32b20..146a085 100644
--- a/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ConvertUintCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index a1ec20a..cd357fb 100644
--- a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index 7f21d1c..150f027 100644
--- a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index 1f1b811..7dd0d49 100644
--- a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
index 55676da..8107821 100644
--- a/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_1D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index c35f357..d690dbf 100644
--- a/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index 117ca8f..e319e91 100644
--- a/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_2DArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index 0d1252f..aa26663 100644
--- a/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index e8e4d1f..d4a73e2 100644
--- a/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index 68ee2c2..25175ab 100644
--- a/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_2D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index aa96b76..4c7f1ac 100644
--- a/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index c199c96..eb44299 100644
--- a/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_3D_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_CubeArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/Good_CubeArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index e47b321..357c811 100644
--- a/test/unittest/reader/spirv/Good_CubeArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_CubeArray_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index f579145..2b86564 100644
--- a/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index bbf88bf..1cc31d7 100644
--- a/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Good_Cube_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index a41a176..5925ccb 100644
--- a/test/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index a98a8d4..fe06360 100644
--- a/test/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_Multisampled_ConvertSampleOperand_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_Multisampled_ConvertSampleOperand_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index ce64fab..6345a99 100644
--- a/test/unittest/reader/spirv/ImageFetch_Multisampled_ConvertSampleOperand_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_Multisampled_ConvertSampleOperand_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_Multisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_Multisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index a92b324..f8bde24 100644
--- a/test/unittest/reader/spirv/ImageFetch_Multisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_Multisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index cadc6e9..4859037 100644
--- a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
index 6f199b5..9584010 100644
--- a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl
index a98a8d4..fe06360 100644
--- a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl
index 276dc12..d0545ae 100644
--- a/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index 8b4fb7d..dad08ff 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 3ec3e6b..b88bd6a 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index daed090..a5495ab 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index f712af0..2dee0b0 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index 770b992..3c4c504 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
index d86b33e..2239f9f 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
index 92dfcc7..ba7e2ba 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl
index 8cbb02d..2ca52ca 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depthcube<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl
index f459c08..6152c24 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depthcube_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQueryLevels_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQueryLevels_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index d959305..73e2dc3 100644
--- a/test/unittest/reader/spirv/ImageQueryLevels_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQueryLevels_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySamples_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySamples_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index ceec1f6..968f404 100644
--- a/test/unittest/reader/spirv/ImageQuerySamples_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySamples_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySamples_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySamples_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index 7ebdb4a..5b2ed4d 100644
--- a/test/unittest/reader/spirv/ImageQuerySamples_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySamples_UnsignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index a995870..f663818 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 765ed45..f75acda 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index 7fc9142..5717a17 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 3134431..83fc391 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_Arrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depthcube_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 005045c..0facef9 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index 29d396e..ea128c4 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 0332d0e..67332d0 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index a050d72..5d81362 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
index 121a49e..e5c95fe 100644
--- a/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySizeLod_NonArrayed_SignedResult_SignedLevel_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depthcube<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index c9fdb6a..856424c 100644
--- a/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySize_Arrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -25,7 +25,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index fb31616..752567f 100644
--- a/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -25,7 +25,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index 32d32d1..2de5b2c 100644
--- a/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -25,7 +25,7 @@
   return;
 }
 
-fragment void tint_symbol(texture3d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture3d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index e20cacf..65e3deb 100644
--- a/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageQuerySize_NonArrayed_SignedResult_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageRead_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageRead_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index eb5b6ad..2f39a14 100644
--- a/test/unittest/reader/spirv/ImageRead_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageRead_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index 9487c30..9dafd8b 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index a4ef480..63b2ca3 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index fb6d7d4..4abbaa8 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 3093834..87603be 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index 13f98de..d4df875 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depthcube<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
index ba834c3..5d62846 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefExplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depthcube_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index 7e9fdfc..9146ee9 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index b3acb6a..3d3f719 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index 33a83c2..0e6614a 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 8e79610..21bbffd 100644
--- a/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleDrefImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index f55dae5..28ae049 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 2f7ff19..d5bea1a 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_DepthTexture_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index fcc5379..5142044 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 12a08ef..447648b 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index aa58df7..b987bed 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 7525579..b6682b3 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index 404f86e..9def2de 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
index b7919d3..0192842 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingGrad_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index ac80cfb..18abb26 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 818bb02..d6dfa64 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index c2b4e58..8b6bf6e 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 95d1681..ce2de4c 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index 63d9173..fa4068f 100644
--- a/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleExplicitLod_UsingLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index 7a45724..e2f4f20 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_BothDrefAndNonDref_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -24,7 +24,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_4 [[texture(1)]], sampler tint_symbol_5 [[sampler(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(0)]], sampler tint_symbol_6 [[sampler(1)]]) {
   main_1(tint_symbol_4, tint_symbol_5, tint_symbol_6);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
index 948a899..d779927 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_0.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
index 1370d88..b27e521 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_1.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
index 1ddb556..3fca582 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_2.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
index 62ec168..378bd5f 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_3.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
index 845974f..525da67 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_4.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
index 00f0d6c..3604bc3 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_5.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
index cf3c642..de3934d 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_6.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl
index 1eb7977..9f75094 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_7.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl
index 84633bc..acd7de0 100644
--- a/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageSampleImplicitLod_SpvParserHandleTest_SampledImageAccessTest_Variable_8.spvasm.expected.msl
@@ -23,7 +23,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index d1812a1..4cf4146 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
index 52da7f5..21c4397 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl
index 04ec3b1..2e6a730 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl
index 9df1b41..73059c6 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_4.spvasm.expected.msl
index 52da7f5..21c4397 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_4.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_5.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_5.spvasm.expected.msl
index 04ec3b1..2e6a730 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_5.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_6.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_6.spvasm.expected.msl
index 9df1b41..73059c6 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_6.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_6.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_7.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_7.spvasm.expected.msl
index 9df1b41..73059c6 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_7.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Arity_SpvParserHandleTest_ImageAccessTest_Variable_7.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index ffcc7eb..f6079d7 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<uint, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<uint, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
index 4c3c05b..5a0dc85 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_SameSignedness_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<int, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<int, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index 2935498..f191b64 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<uint, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<uint, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
index 7d520f0..6660ef6 100644
--- a/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_ConvertTexelOperand_Signedness_AndWidening_SpvParserHandleTest_ImageAccessTest_Variable_1.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<int, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<int, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/ImageWrite_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl b/test/unittest/reader/spirv/ImageWrite_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
index 9df1b41..73059c6 100644
--- a/test/unittest/reader/spirv/ImageWrite_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/ImageWrite_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.msl
@@ -19,7 +19,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/Multisampled_Only2DNonArrayedIsValid_SpvParserHandleTest_ImageDeclTest_DeclareAndUseHandle_2.spvasm.expected.msl b/test/unittest/reader/spirv/Multisampled_Only2DNonArrayedIsValid_SpvParserHandleTest_ImageDeclTest_DeclareAndUseHandle_2.spvasm.expected.msl
index 9986bb6..f4cb285 100644
--- a/test/unittest/reader/spirv/Multisampled_Only2DNonArrayedIsValid_SpvParserHandleTest_ImageDeclTest_DeclareAndUseHandle_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Multisampled_Only2DNonArrayedIsValid_SpvParserHandleTest_ImageDeclTest_DeclareAndUseHandle_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_ms<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index c35f357..d690dbf 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index 115552a..cbd2780 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index 433bf89..c15b716 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index a1ec20a..cd357fb 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index 0d1252f..aa26663 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
index 3bb2499..6bcdf1b 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
index c8f870d..8de442d 100644
--- a/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveFloatCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index 6f308d5..e606b3b 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index f1e2f5b..d9da0fc 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index fd02394..8bc602e 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d_array<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d_array<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
index 114e6a6..a6c4ed3 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture1d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
index 63947de..725effd 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture1d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
index 8c9200b..f52757c 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture1d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture1d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
index b558cba..f13373d 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_3.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
index e34199f..ad47c3a 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_4.spvasm.expected.msl
@@ -21,7 +21,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::read> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl
index 7fdda0e..5985570 100644
--- a/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/PreserveIntCoords_NonArrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_5.spvasm.expected.msl
@@ -20,7 +20,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(1)]]) {
+fragment void tint_symbol(texture2d<float, access::write> tint_symbol_2 [[texture(0)]]) {
   main_1(tint_symbol_2);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_2.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_2.spvasm.expected.msl
index 2994e9c..9016445 100644
--- a/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_2.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_2.spvasm.expected.msl
@@ -6,7 +6,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_3.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_3.spvasm.expected.msl
index 72e2824..6c769c6 100644
--- a/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_3.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_3.spvasm.expected.msl
@@ -6,7 +6,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.msl b/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.msl
index ab2c890..e86f00a 100644
--- a/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/Samples_SpvParserHandleTest_RegisterHandleUsage_SampledImage_Variable_4.spvasm.expected.msl
@@ -6,7 +6,7 @@
   return;
 }
 
-fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(1)]], sampler tint_symbol_4 [[sampler(0)]]) {
+fragment void tint_symbol(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/unittest/reader/spirv/SpvParserHandleTest_NeverGenerateConstDeclForHandle_UseVariableDirectly.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserHandleTest_NeverGenerateConstDeclForHandle_UseVariableDirectly.spvasm.expected.msl
index 9ff54da..2cddd7c 100644
--- a/test/unittest/reader/spirv/SpvParserHandleTest_NeverGenerateConstDeclForHandle_UseVariableDirectly.spvasm.expected.msl
+++ b/test/unittest/reader/spirv/SpvParserHandleTest_NeverGenerateConstDeclForHandle_UseVariableDirectly.spvasm.expected.msl
@@ -9,7 +9,7 @@
   return;
 }
 
-fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(1)]]) {
+fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
   main_1(tint_symbol_3, tint_symbol_4);
   return;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.msl
index a410fd8..37464bf 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.spvasm.expected.msl
@@ -10,7 +10,7 @@
   return;
 }
 
-kernel void tint_symbol(device block0& x_4 [[buffer(1)]]) {
+kernel void tint_symbol(device block0& x_4 [[buffer(0)]]) {
   main_1(x_4);
   return;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.msl
index a410fd8..37464bf 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_compute/0.wgsl.expected.msl
@@ -10,7 +10,7 @@
   return;
 }
 
-kernel void tint_symbol(device block0& x_4 [[buffer(1)]]) {
+kernel void tint_symbol(device block0& x_4 [[buffer(0)]]) {
   main_1(x_4);
   return;
 }
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl
index 6aac916..fdcbca1 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.spvasm.expected.msl
@@ -31,7 +31,7 @@
   return tint_symbol_4;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) {
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
   thread float4 tint_symbol_13 = 0.0f;
diff --git a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl
index 6aac916..fdcbca1 100644
--- a/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/binding_model/dynamic_offset/shader_reuse_differing_layout_graphics/0.wgsl.expected.msl
@@ -31,7 +31,7 @@
   return tint_symbol_4;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(1)]]) {
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant block0& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
   thread float4 tint_symbol_13 = 0.0f;
diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl
index 833620b..4a67f4b 100644
--- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl
@@ -53,7 +53,7 @@
   main_1(x_10, x_7, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(1)]], device doesNotMatter& x_7 [[buffer(0)]]) {
+kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(0)]], device doesNotMatter& x_7 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_10, x_7, gl_LocalInvocationID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl
index 833620b..4a67f4b 100644
--- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl
@@ -53,7 +53,7 @@
   main_1(x_10, x_7, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(1)]], device doesNotMatter& x_7 [[buffer(0)]]) {
+kernel void tint_symbol(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], constant buf1& x_10 [[buffer(0)]], device doesNotMatter& x_7 [[buffer(1)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_10, x_7, gl_LocalInvocationID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl
index cdcf6c0..79a8f2a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.spvasm.expected.msl
@@ -74,7 +74,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl
index cdcf6c0..79a8f2a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-access-array-dot/0-opt.wgsl.expected.msl
@@ -74,7 +74,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl
index 6b0ac98..c5ef40a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl
@@ -61,7 +61,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl
index 6b0ac98..c5ef40a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl
@@ -61,7 +61,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl
index 6e62aae..b2f2542 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.spvasm.expected.msl
@@ -75,7 +75,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl
index 6e62aae..b2f2542 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mix-nan/0-opt.wgsl.expected.msl
@@ -75,7 +75,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl
index 7a82ca4..02b9fec 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl
@@ -65,7 +65,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl
index ab0ee7b..b8e6b45 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl
@@ -65,7 +65,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
index 63a5368..5ef03b5 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
@@ -94,7 +94,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
index 058c094..8f8e26d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
@@ -94,7 +94,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(0)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl
index 5a4b18d..46fb959 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.spvasm.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_15 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_15, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl
index 5a4b18d..46fb959 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-undefined-matrix-mul/0-opt.wgsl.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_15 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_15 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_15, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl
index 12462b9..c26b21e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.spvasm.expected.msl
@@ -70,7 +70,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl
index 12462b9..c26b21e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-atan-trunc-vec4/0-opt.wgsl.expected.msl
@@ -70,7 +70,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl
index 7a45463..47e12de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.spvasm.expected.msl
@@ -67,7 +67,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]], constant buf1& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl
index 7a45463..47e12de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-bitwise-inverse-uniform-condition/0-opt.wgsl.expected.msl
@@ -67,7 +67,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]], constant buf1& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl
index c933708..29044a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl
@@ -153,7 +153,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl
index c933708..29044a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl
@@ -153,7 +153,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl
index 3cd5c26..783e0a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.spvasm.expected.msl
@@ -58,7 +58,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl
index 3cd5c26..783e0a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-lower-limit-from-always-false/0-opt.wgsl.expected.msl
@@ -58,7 +58,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl
index 9a348cb..47a08bb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl
@@ -87,7 +87,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl
index 9a348cb..47a08bb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl
@@ -87,7 +87,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl
index 6bbaedc..323f746 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.spvasm.expected.msl
@@ -59,7 +59,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl
index 6bbaedc..323f746 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-element-ceil-negative/0-opt.wgsl.expected.msl
@@ -59,7 +59,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl
index e87cab7..769c582 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.spvasm.expected.msl
@@ -59,7 +59,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl
index e87cab7..769c582 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-variable-negative-offset/0-opt.wgsl.expected.msl
@@ -59,7 +59,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl
index 4702f9a..87589dc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl
@@ -141,7 +141,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_16 [[buffer(1)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_16, x_12, x_14, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl
index 4702f9a..87589dc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl
@@ -141,7 +141,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_16 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_16 [[buffer(1)]], constant buf2& x_12 [[buffer(2)]], constant buf3& x_14 [[buffer(3)]]) {
   thread float4 tint_symbol_11 = 0.0f;
   thread float4 tint_symbol_12 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_16, x_12, x_14, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl
index c881e3f..cc5c5f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.spvasm.expected.msl
@@ -54,7 +54,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl
index c881e3f..cc5c5f3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-combine-and-or-xor-gt-lt/0-opt.wgsl.expected.msl
@@ -54,7 +54,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl
index 08bc379..b5d23b3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl
@@ -73,7 +73,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(1)]], constant buf1& x_11 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, x_11, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl
index 08bc379..b5d23b3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl
@@ -73,7 +73,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(2)]], constant buf1& x_11 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_9 [[buffer(1)]], constant buf1& x_11 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, x_11, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl
index f1ca39d..0c324b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.spvasm.expected.msl
@@ -86,7 +86,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl
index f1ca39d..0c324b6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-clamp-undefined-access-array/0-opt.wgsl.expected.msl
@@ -86,7 +86,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl
index 22daaaa..a3d7b68 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.spvasm.expected.msl
@@ -95,7 +95,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_12, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl
index 22daaaa..a3d7b68 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-glf_color/0-opt.wgsl.expected.msl
@@ -95,7 +95,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_12, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl
index 4c2b271..d3956b2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl
@@ -57,7 +57,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl
index 4c2b271..d3956b2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl
@@ -57,7 +57,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl
index 9aed201..7082501 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl
@@ -90,7 +90,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]], constant buf2& x_12 [[buffer(2)]]) {
   thread int tint_symbol_7 = 0;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl
index 9aed201..7082501 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl
@@ -90,7 +90,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]], constant buf2& x_12 [[buffer(2)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]], constant buf2& x_12 [[buffer(2)]]) {
   thread int tint_symbol_7 = 0;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_10, x_12, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl
index 01e60e6..24f3615 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.spvasm.expected.msl
@@ -71,7 +71,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl
index 01e60e6..24f3615 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-float-array-init-pow/0-opt.wgsl.expected.msl
@@ -71,7 +71,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl
index 7ff331c..f849bf4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl
@@ -78,7 +78,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl
index 7ff331c..f849bf4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl
@@ -78,7 +78,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl
index b524bab..c79bb78 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.spvasm.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl
index b524bab..c79bb78 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-fragcoord-condition-always-return/0-opt.wgsl.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_11, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl
index 2aade82..6f6cbd7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.spvasm.expected.msl
@@ -73,7 +73,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf2& x_10 [[buffer(1)]], constant buf0& x_13 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl
index 2aade82..6f6cbd7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-function-vec2-never-discard/0-opt.wgsl.expected.msl
@@ -73,7 +73,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_13 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf2& x_10 [[buffer(1)]], constant buf0& x_13 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, x_13, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl
index e311cce..cf1dea6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl
@@ -140,7 +140,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf2& x_15 [[buffer(2)]]) {
   thread int tint_symbol_7 = 0;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl
index e311cce..cf1dea6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl
@@ -140,7 +140,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]], constant buf2& x_15 [[buffer(2)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf2& x_15 [[buffer(2)]]) {
   thread int tint_symbol_7 = 0;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl
index c5dd937..d59f92c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl
@@ -98,7 +98,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl
index c5dd937..d59f92c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl
@@ -98,7 +98,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl
index 46227d4..bf26d93 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl
@@ -91,7 +91,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl
index 46227d4..bf26d93 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl
@@ -91,7 +91,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl
index ff67ea0..d1326de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl
@@ -79,7 +79,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl
index ff67ea0..d1326de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl
@@ -79,7 +79,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl
index 2627080..60534a5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl
@@ -97,7 +97,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl
index 2627080..60534a5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl
@@ -97,7 +97,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl
index 8b81c22..1625529 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl
@@ -60,7 +60,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl
index 8b81c22..1625529 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl
@@ -60,7 +60,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl
index cd57211..1f130ef 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.msl
@@ -102,7 +102,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl
index cd57211..1f130ef 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.msl
@@ -102,7 +102,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl
index a5bd868..30dd489 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl
@@ -102,7 +102,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl
index a5bd868..30dd489 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl
@@ -102,7 +102,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl
index 566a8ab..1e87c9e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.msl
@@ -101,7 +101,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl
index 566a8ab..1e87c9e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.msl
@@ -101,7 +101,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl
index 171f582..9819165 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.msl
@@ -103,7 +103,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl
index 171f582..9819165 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.msl
@@ -103,7 +103,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl
index 55192e7..58d8ed5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl
@@ -66,7 +66,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl
index 55192e7..58d8ed5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl
@@ -66,7 +66,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_5, x_8, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl
index a81c921..a52b3c2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl
@@ -53,7 +53,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl
index a81c921..a52b3c2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl
@@ -53,7 +53,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
index 999c01a..02f2756 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl
index 0a7145b..7a1ba57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl
index 1246289..f544c71 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl
@@ -135,7 +135,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl
index 1246289..f544c71 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl
@@ -135,7 +135,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_6 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_8 = 0.0f;
   thread float4 tint_symbol_9 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_12, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl
index f4af9d1..cb5189b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl
index f4af9d1..cb5189b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl
@@ -96,7 +96,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl
index 5709ee1..abc3289 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.spvasm.expected.msl
@@ -64,7 +64,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl
index 5709ee1..abc3289 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-missing-return-value-function-never-called/0-opt.wgsl.expected.msl
@@ -64,7 +64,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl
index 4d230c5..399547d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.spvasm.expected.msl
@@ -74,7 +74,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]], constant buf1& x_12 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl
index 4d230c5..399547d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-modulo-zero-never-executed/0-opt.wgsl.expected.msl
@@ -74,7 +74,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]], constant buf1& x_12 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_8 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]], constant buf1& x_12 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_8, x_10, x_12, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
index 996fea0..22e1683 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
@@ -128,7 +128,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf1& x_16 [[buffer(2)]]) {
   thread float4 tint_symbol_12 = 0.0f;
   thread float4x2 tint_symbol_13 = float4x2(0.0f);
   thread float4 tint_symbol_14 = 0.0f;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl
index b0c0ae0..cc1e66d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl
@@ -128,7 +128,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]], constant buf1& x_16 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf1& x_16 [[buffer(2)]]) {
   thread float4 tint_symbol_12 = 0.0f;
   thread float4x2 tint_symbol_13 = float4x2(0.0f);
   thread float4 tint_symbol_14 = 0.0f;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl
index 69d8106..cd94878 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl
@@ -107,7 +107,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl
index 69d8106..cd94878 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl
@@ -107,7 +107,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_11 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_11 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl
index 61d0827..dd67596 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.spvasm.expected.msl
@@ -71,7 +71,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(1)]], constant buf1& x_13 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_11, x_13, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl
index 61d0827..dd67596 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-identical-value-sqrt/0-opt.wgsl.expected.msl
@@ -71,7 +71,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]], constant buf1& x_13 [[buffer(1)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf2& x_11 [[buffer(1)]], constant buf1& x_13 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_11, x_13, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl
index 31ebccb..bfabb10 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.spvasm.expected.msl
@@ -68,7 +68,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf2& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl
index 31ebccb..bfabb10 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined-result-condition-with-always-true/0-opt.wgsl.expected.msl
@@ -68,7 +68,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf2& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl
index 1ccb594..853853a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl
@@ -84,7 +84,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl
index 1ccb594..853853a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl
@@ -84,7 +84,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl
index 32fd0e5..4d3ae08 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl
@@ -70,7 +70,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]], constant buf2& x_11 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl
index 32fd0e5..4d3ae08 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl
@@ -70,7 +70,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]], constant buf2& x_11 [[buffer(2)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]], constant buf2& x_11 [[buffer(2)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, x_11, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl
index e632817..606d33f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.spvasm.expected.msl
@@ -52,7 +52,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]], constant buf0& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl
index e632817..606d33f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-lt-gt/0-opt.wgsl.expected.msl
@@ -52,7 +52,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf0& x_7 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]], constant buf0& x_7 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_5, x_7, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl
index f019220..f66c766 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.spvasm.expected.msl
@@ -75,7 +75,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl
index f019220..f66c766 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sinh-ldexp/0-opt.wgsl.expected.msl
@@ -75,7 +75,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl
index 9c92bd8..0a5469a 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.spvasm.expected.msl
@@ -93,7 +93,7 @@
   return tint_symbol_4;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf2& x_9 [[buffer(1)]], constant buf3& x_12 [[buffer(2)]], constant buf0& x_15 [[buffer(3)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, x_12, x_15, &(tint_symbol_7));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl
index 9c92bd8..0a5469a 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-struct-float-array-mix-uniform-vectors/0-opt.wgsl.expected.msl
@@ -93,7 +93,7 @@
   return tint_symbol_4;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(1)]], constant buf2& x_9 [[buffer(2)]], constant buf3& x_12 [[buffer(3)]], constant buf0& x_15 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf2& x_9 [[buffer(1)]], constant buf3& x_12 [[buffer(2)]], constant buf0& x_15 [[buffer(3)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, x_12, x_15, &(tint_symbol_7));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl
index fa05b2e..7654af7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.spvasm.expected.msl
@@ -61,7 +61,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf2& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl
index fa05b2e..7654af7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-sum-uniform-vector-components-round/0-opt.wgsl.expected.msl
@@ -61,7 +61,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf2& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl
index 033e7cb..a753a22 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl
@@ -95,7 +95,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]], constant buf2& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_5, x_7, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl
index 033e7cb..a753a22 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl
@@ -95,7 +95,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(1)]], constant buf2& x_7 [[buffer(2)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_5 [[buffer(0)]], constant buf2& x_7 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_5, x_7, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl
index bebdfd6..4b4e8bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.spvasm.expected.msl
@@ -56,7 +56,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl
index bebdfd6..4b4e8bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-trunc-fract-always-zero/0-opt.wgsl.expected.msl
@@ -56,7 +56,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_7 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_7 = 0.0f;
   thread float4 tint_symbol_8 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_7, x_9, gl_FragCoord_param, &(tint_symbol_7), &(tint_symbol_8));
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl
index 340627c..f123d3d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl
@@ -101,7 +101,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl
index 340627c..f123d3d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl
@@ -101,7 +101,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
index c1027b9..96fef1d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
@@ -99,7 +99,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl
index 06467ef..c1d712d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl
@@ -99,7 +99,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_10 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl
index e498cd3..fded02b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.spvasm.expected.msl
@@ -64,7 +64,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl
index e498cd3..fded02b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-max-uintbitstofloat/0-opt.wgsl.expected.msl
@@ -64,7 +64,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(2)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf2& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_10 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_10, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl
index ae37da2..4658b19 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl
@@ -75,7 +75,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl
index ae37da2..4658b19 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl
@@ -75,7 +75,7 @@
   return tint_symbol_3;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_8 [[buffer(1)]]) {
   thread float4 tint_symbol_6 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, &(tint_symbol_6));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl
index 85dcc7c..de16e9d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.spvasm.expected.msl
@@ -70,7 +70,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf2& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_12, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl
index 85dcc7c..de16e9d 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-machine-value-type-uint-to-float/0-opt.wgsl.expected.msl
@@ -70,7 +70,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf2& x_8 [[buffer(2)]], constant buf0& x_12 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf2& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(2)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_8, x_12, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl
index 18d3471..e487692 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl
@@ -128,7 +128,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl
index 18d3471..e487692 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl
@@ -128,7 +128,7 @@
   return tint_symbol_2;
 }
 
-fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
+fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(0)]], constant buf0& x_9 [[buffer(1)]]) {
   thread float4 tint_symbol_5 = 0.0f;
   main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_5));
   tint_symbol_1 wrapper_result = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl
index 8e396a6..187df32 100644
--- a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl
@@ -95,7 +95,7 @@
   return;
 }
 
-kernel void tint_symbol(constant buf1& x_6 [[buffer(1)]], device theSSBO& x_4 [[buffer(0)]]) {
+kernel void tint_symbol(constant buf1& x_6 [[buffer(0)]], device theSSBO& x_4 [[buffer(1)]]) {
   main_1(x_6, x_4);
   return;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl
index 8e396a6..187df32 100644
--- a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl
@@ -95,7 +95,7 @@
   return;
 }
 
-kernel void tint_symbol(constant buf1& x_6 [[buffer(1)]], device theSSBO& x_4 [[buffer(0)]]) {
+kernel void tint_symbol(constant buf1& x_6 [[buffer(0)]], device theSSBO& x_4 [[buffer(1)]]) {
   main_1(x_6, x_4);
   return;
 }
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl
index e6931e1..e69127f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl
@@ -263,7 +263,7 @@
   return tint_symbol_4;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) {
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(0)]], constant buf0& x_37 [[buffer(1)]]) {
   thread float4 tint_symbol_18 = 0.0f;
   thread float4 tint_symbol_19 = 0.0f;
   thread QuicksortObject tint_symbol_20 = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl
index e6931e1..e69127f 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl
@@ -263,7 +263,7 @@
   return tint_symbol_4;
 }
 
-vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(1)]], constant buf0& x_37 [[buffer(0)]]) {
+vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant buf1& x_34 [[buffer(0)]], constant buf0& x_37 [[buffer(1)]]) {
   thread float4 tint_symbol_18 = 0.0f;
   thread float4 tint_symbol_19 = 0.0f;
   thread QuicksortObject tint_symbol_20 = {};
diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl
index 469427d..af2585f 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl
@@ -82,7 +82,7 @@
   return;
 }
 
-kernel void tint_symbol(constant buf0& x_9 [[buffer(1)]], device doesNotMatter& x_12 [[buffer(0)]]) {
+kernel void tint_symbol(constant buf0& x_9 [[buffer(0)]], device doesNotMatter& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_2 = 0.0f;
   main_1(x_9, x_12, &(tint_symbol_2));
   return;
diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl
index 469427d..af2585f 100644
--- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl
@@ -82,7 +82,7 @@
   return;
 }
 
-kernel void tint_symbol(constant buf0& x_9 [[buffer(1)]], device doesNotMatter& x_12 [[buffer(0)]]) {
+kernel void tint_symbol(constant buf0& x_9 [[buffer(0)]], device doesNotMatter& x_12 [[buffer(1)]]) {
   thread float4 tint_symbol_2 = 0.0f;
   main_1(x_9, x_12, &(tint_symbol_2));
   return;
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl
index 1efbb49..8e628fb 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl
@@ -135,7 +135,7 @@
   main_1(x_10, x_13, x_15, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(1)]], constant buf2& x_13 [[buffer(2)]], device doesNotMatter& x_15 [[buffer(0)]]) {
+kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(0)]], constant buf2& x_13 [[buffer(1)]], device doesNotMatter& x_15 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_10, x_13, x_15, gl_GlobalInvocationID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl
index 1efbb49..8e628fb 100644
--- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl
@@ -135,7 +135,7 @@
   main_1(x_10, x_13, x_15, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(1)]], constant buf2& x_13 [[buffer(2)]], device doesNotMatter& x_15 [[buffer(0)]]) {
+kernel void tint_symbol(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant buf1& x_10 [[buffer(0)]], constant buf2& x_13 [[buffer(1)]], device doesNotMatter& x_15 [[buffer(2)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_10, x_13, x_15, gl_GlobalInvocationID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl
index 393cfd1..9e205bf 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl
@@ -104,7 +104,7 @@
   main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In1& x_17 [[buffer(1)]], device Out0& x_15 [[buffer(3)]], const device In0& x_19 [[buffer(0)]]) {
+kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(1)]], const device In1& x_17 [[buffer(2)]], device Out0& x_15 [[buffer(0)]], const device In0& x_19 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl
index 393cfd1..9e205bf 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl
@@ -104,7 +104,7 @@
   main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In1& x_17 [[buffer(1)]], device Out0& x_15 [[buffer(3)]], const device In0& x_19 [[buffer(0)]]) {
+kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(1)]], const device In1& x_17 [[buffer(2)]], device Out0& x_15 [[buffer(0)]], const device In0& x_19 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl
index c91975f..eeb4a33 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl
@@ -104,7 +104,7 @@
   main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In0& x_17 [[buffer(0)]], device Out0& x_15 [[buffer(3)]], const device In1& x_19 [[buffer(1)]]) {
+kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(1)]], const device In0& x_17 [[buffer(2)]], device Out0& x_15 [[buffer(0)]], const device In1& x_19 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl
index c91975f..eeb4a33 100644
--- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl
@@ -104,7 +104,7 @@
   main_1(x_13, x_17, x_15, x_19, tint_symbol_2);
 }
 
-kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(2)]], const device In0& x_17 [[buffer(0)]], device Out0& x_15 [[buffer(3)]], const device In1& x_19 [[buffer(1)]]) {
+kernel void tint_symbol(uint3 gl_WorkGroupID_param [[threadgroup_position_in_grid]], const device In2& x_13 [[buffer(1)]], const device In0& x_17 [[buffer(2)]], device Out0& x_15 [[buffer(0)]], const device In1& x_19 [[buffer(3)]]) {
   thread uint3 tint_symbol_3 = 0u;
   tint_symbol_inner(x_13, x_17, x_15, x_19, gl_WorkGroupID_param, &(tint_symbol_3));
   return;
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.msl
index 1917c7a..c05e29d 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.msl
@@ -32,7 +32,7 @@
   return;
 }
 
-kernel void tint_symbol(device Buf1& x_4 [[buffer(1)]], device Buf0& x_7 [[buffer(0)]]) {
+kernel void tint_symbol(device Buf1& x_4 [[buffer(0)]], device Buf0& x_7 [[buffer(1)]]) {
   main_1(x_4, x_7);
   return;
 }
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.msl
index 1917c7a..c05e29d 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.msl
@@ -32,7 +32,7 @@
   return;
 }
 
-kernel void tint_symbol(device Buf1& x_4 [[buffer(1)]], device Buf0& x_7 [[buffer(0)]]) {
+kernel void tint_symbol(device Buf1& x_4 [[buffer(0)]], device Buf0& x_7 [[buffer(1)]]) {
   main_1(x_4, x_7);
   return;
 }